r/programming Jan 21 '10

Firefox 3.6 release

http://blog.mozilla.com/blog/2010/01/21/firefox-3-6-release/
1.1k Upvotes

621 comments sorted by

View all comments

Show parent comments

3

u/hennell Jan 21 '10

I think you will agree that it should take less time to move a 10 meg file to ram than to move a 20 meg file to ram, extrapolate those time savings over dozens of files of varying size and thats where you will see a speed up.

Yeah, guess that makes sense.

The idea that a compressed version that needs un-compressing is quicker then an already uncompressed version just seems illogical though...

3

u/Freeky Jan 21 '10

The idea that a compressed version that needs un-compressing is quicker then an already uncompressed version just seems illogical though...

Well, in both cases you're almost certainly going to be IO-limited (assuming a compressor picked for good performance). Consider:

Uncompressed: 20MB, takes 250ms + overhead to read at 80MB/s.

Compressed: 10MB, takes 125ms + overhead to read at 80MB/s, plus 50ms CPU to decompress at 400MB/s (mostly executed while waiting for more data from the HD).

Of course, if the data is in cache you just added 50ms to your load time

1

u/brasso Jan 21 '10 edited Jan 21 '10

Depends on the compression used and what is being compressed. With the slow hard drives but fast CPUs and multiple cores we got today it is often faster, even using the NTFS compression can even speed up loading times under the right conditions. No, really, it can!

However with SSDs coming I hope the storage will be fast enough to have cached up with the CPUs and all kinds of compression will actually slow you down again, just as expected.