[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Searching a VERY large text file



On Thu, 5 Feb 1998 10:36:55 +0000, you wrote:

>Is there some way of compiling MacPerl scripts into machine language or
>converting them into C/C++ routines that I could then read into
>CodeWarrior... Maybe this would increase speed - then again maybe not??

Now why do people always believe that converting Perl code to C will
magically crank up the speed by a factor of 10? 'Cos it won't. I think.

Perl is pretty good in scanning for text. It's the file access that is
the bottleneck.

I think that, if you read in the data via sysread/read in blocks of,
say, 32k, and scan those, you might get a decent speed incease.

But the code won't look as nice: you have to consider (and deal with)
the possibility of missing a possible match on the edge between two
blocks.

	Bart.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch