in reply to Re: Re: character-by-character in a huge file
in thread character-by-character in a huge file

It depends on the frequency of the matches. I'm convinced that one call to index() on a string of 10k, with a negative result, or just a few matches, is a lot faster than 10000 calls to getc() and the same number of eq tests. It's a matter of doing the same task in C, or in Perl. C usually wins hands down.
  • Comment on Re: Re: Re: character-by-character in a huge file