[Pdx-pm] string comparison vs hash
chromatic
chromatic at wgz.org
Tue May 29 15:54:55 PDT 2007
On Tuesday 29 May 2007 15:35:07 Austin Schutz wrote:
> You are using different file reading techniques. That could be
> _very_ significant. If you are going to slurp all the lines for the
> string comparison you should do the same for the hash.
Worse than that, the first code to read the file pays the penalty of
populating file buffers. Subsequent reads probably all come from a warm
cache.
Mixing IO with benchmarks usually skews the results heavily.
-- c
More information about the Pdx-pm-list
mailing list