I’m releasing today the Geohash Nif library, a complete 100% compatible drop in replacement for the native Elixir Geohash library, but much faster (up to 60 times faster on my system) and with a much lower memory footprint.
Detailed benchmark results including memory measurements can be found in the Geohash Nif repository
The library is battery included and has zero dependencies.
Since the library has a relevant user base (around 125k installations) I’ve made only one small change in the
neighbors function, but it’s kept behind an option which defaults to a fully compatible behavior.
The change allows users to retrieve the neighbors map with atoms as keys, which is both consistent with
bounds return value and around 30% faster, but I thought backward compatibility was more important and I haven’t made it default, also the strings version is faster than the Elixir one anyway.
I want to personally thank polmuz for creating the original Elixir implementation, it served me good for a long time until I needed something more performant.
Let me know what you think!