Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: IF condition that doesnt work

by Tanktalus (Canon)
on Dec 23, 2009 at 22:55 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found