Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: Seeking through a large gzipped file

by Corion (Pope)
on May 14, 2013 at 17:34 UTC ( #1033529=note: print w/replies, xml ) Need Help??

in reply to Re: Seeking through a large gzipped file
in thread Seeking through a large gzipped file

If you have at least one idle CPU, using open "zcat $file |" will allow you to spread the load across two CPUs, one for the perl process and one for the zcat process. That way, all the CPU cycles you need for decompressing the data get offloaded from perl. This should be at least as fast as using [mod://PerlIO::via::gzip</c> if not faster, as usually transferring the data between processes is fairly fast.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033529]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-10-26 04:40 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (333 votes). Check out past polls.