Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: IF condition that doesnt work

by Tanktalus (Canon)
on Dec 23, 2009 at 22:55 UTC ( #814159=note: print w/replies, xml ) Need Help??

in reply to Re: IF condition that doesnt work
in thread IF condition that doesnt work

It will save space on disk, but I'm not sure if this performs.

Slightly off-topic, but it generally will perform much better, at least once you get past the threshold of launching another process (perhaps using PerlIO::gzip would eliminate that). That's because, in general, the amount of CPU time it takes to decompress something is miniscule relative to the amount of time it takes to read the uncompressed information from disk. That is, reading compressed data plus the CPU overhead of decompressing that data is a fraction of the time required to read the data if it weren't compressed, because disks are so slow.

Note that there are a few assumptions here: a) the amount of space saved by compression is significant (1% compression may not be a big deal, but 50%+ is), b) there are spare CPU cycles on the system, i.e., you're idling while waiting for the disk to catch up (a heavily used server that does a lot of CPU crunching may not qualify), c) traditional disks are used, i.e., disks with moving parts (SSD may, or may not, change this equation, though the cost of the storage space may be a different factor in favour of compression). Since all of these assumptions hold most of the time, I use the term "generally will" above instead of merely "can".

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://814159]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-02-25 11:57 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (365 votes). Check out past polls.