4 ms·
A few times I've had an irregular 2D dataset to process and thought "aha, maybe I can be lazy and iterate ordered by a space filling curve coordinates and it'll
by mkj 2mo ago
A few times I've had an irregular 2D dataset to process and thought "aha, maybe I can be lazy and iterate ordered by a space filling curve coordinates and it'll be more cache effective". But it's never given any improvement. Anyone tried something similar?
- zX41ZdbW 2mo agoYes, for example, the datasets at this page: https://adsb.exposed/ https://adsb.exposed/ are indexed by the Morton curve: https://github.com/ClickHouse/adsb.exposed/#database-and-queries https://github.com/ClickHouse/adsb.exposed/#database-and-que... and https://reversedns.space/ https://reversedns.space/ as well. Also, a trivial application is image compression. Let's say you have a PNG image. PNG uses zlib, so if instead you take a raw bitmap and compress it with ZSTD, it typically will be better, but if you also sort pixels by the Hilbert curve first and then compress with ZSTD, it will be typically even better.
- mkj 2mo agoAha, thanks. The adsb.exposed maps are excellent, thank you! Really intrigued by the building maps.