../bit-graph-rs

1 minute read

A friend messaged me one day asking how to implement the underlying representation of a graph. I jokingly responded, that depending on if you need to encode anything on the edges, you could represet each edge as a single bit packed with other edges into a single word in memory. The more I thought about it, the funner it sounded to mock up. I am not sure of the performance implications, but it works well as a backend for my mazes project. As it turns out, having a graph library in hand inspired me to make that mazes project, something I have thought about doing for a long time, just never had the right circumstances arise.