News for hackers. Stuff that matters.
Re:QOI: Lossless Image Compression in O(n) Time by andai on Wednesday November 24, 2021 @07:15AM (#29329213)
See also: Intel's guide to looping over smaller chunks of 2D arrays for better cache utilization:

https://www.intel.com/content/www/us/en/developer/articles/t...

Re:QOI: Lossless Image Compression in O(n) Time by EdSchouten on Wednesday November 24, 2021 @07:39AM (#29329380)
Yeah, those images explain it pretty well. There is one slight difference, though.

Because the Hilbert/Z-order curves are defined recursively, algorithms for converting between the curve and row/column order are "cache-oblivious", in that they don't need to take an explicit block size. You write it once, and it performs well on any system regardless the CPU cache size and/or page size.