Is there a faster solution than my actual \'zcat\' solution to gunzip files with Perl?
A little benchmark:
#!/usr/bin/perl
use strict;
use warnings;
The last time I tried it, spawning an external gunzip
was considerably faster than using a Perl module (just like your benchmarks show). I suspect it's all the method calls involved in tying a filehandle.
I expect <$z>
is slower than $z->getline
for a similar reason. There's more magic involved in figuring out that the first needs to be translated into the second.