Inside font-rs, a font renderer written in Rust
Impressive!<p>> dense representations have a huge advantage when data-parallelism is an option<p>Sparse or dense isn’t binary choice, it’s possible to combine the two to have best of both.<p>When I was working on similar problem in 3D space and with much larger dataset, I represented my voxels as sparse collection of small dense blocks. The blocks are small enough to fit in a single cache line, small enough to save a lot of RAM space + bandwidth because many are empty, but inside they are dense and large enough to benefit from SIMD parallelism.<p>However, for 2D images that only take a few hundred kb RAM dense buffer is probably better because fits in L1 or at least L2 cache.