4 ms·
To be honest, I hadnt expected a speed problem here. However, * gzipping 7680×2160x3 bytes from /dev/urandom on my thinkpad x220t takes 1.6 seconds (not mutch
by hyperman1 8y ago
To be honest, I hadnt expected a speed problem here.
However,
* gzipping 7680×2160x3 bytes from /dev/urandom on my thinkpad x220t takes 1.6 seconds (not mutch difference between -1 and -9)
* gzipping /dev/zero takes 0.4 seconds
So it turns out this might be a problem after all!
- Twirrim 8y agoI'm not sure what you expected? Random data doesn't compress well, and requires a lot more effort by the compressor. Images aren't anywhere near that random.
- hyperman1 8y agoI expected the throughput of the gzip process to be a lot higher, to be honest. Bot the random data and the stream of zeros took a noticeable time to compress. In a video game or real-time mpeg stream decoding job, the video card has to generate this amount of data 30-60 times per seconds. So 0.4-1.6 seconds to compress the result seems long in comparison. I tested the 2 extreme situations I could think of: ultimate random and ultimate order. Images will fall somewhere between these 2 limits, so on my PC, the PNG compression has a lower bound of 0.4-1.6 seconds to write an image with the current algorithm.