The Daily WTF
Rust is one of the “cool” languages these days. It promises all the low-level power of C with memory safety and “modern” programming conventions like iterables and maps. High performance, expressive language, low-level power seems like a great combination for certain domains.
Now, Jenna Winchester needed to do some Morton Coding or Z-indexing, which is an algorithm which lets you take multidimensional points and turn them into 1-dimensional points in a way that maintains their spatial relationships- essentially a fast way of traversing a quadtree. It’s a fairly simple and fast algorithm, especially if you implement it using bitwise operations. A naive implementation, without optimizations, can do its job with very few CPU cycles, relatively speaking.
And while Jenna could have implemented her own version of it, never reinvent a wheel that someone else probably has. So she tracked down a Rust library (or crate, if we’re using Rust
To read the full article click on the 'post' link at the top.