Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Won't this slow things down?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Won't this slow things down?
Authored by: moki on Oct 08, '01 05:30:48PM

It will actually be faster, for the two reasons I mentioned. First, less swapping (which will happen somewhat, regardless of how much RAM you have).

Secondly, consider that most modern CPUs are memory bandwidth-bound. When you need to update a window with a 200K buffer, you have to read in 200K of data, then write out 200K of data.

The vast majority of the time spent doing this copying involves the CPU just sitting and spinning waiting for data. If you use the compressed buffer, and a reasonable 10:1 compression ratio, you only need to read in 20K of data, running it by a simple algorithm, and write out 200K of data.

Since your are 10x less memory bound, and since you're using CPU cycles that would have been wasted anyway, you are faster. This is the same principle behind RLE blitters, etc.



[ Reply to This | # ]