Hello all.
Happy to mention the lastest release of the google_hash gem.
Description:
The goal is a better hash for Ruby, either one that is faster or more
space efficient than ruby’s default.
It has classes like
GoogleHashDenseLongToLong # faster
GoogleHashSparseLongToLong # leaner – uses less memory.
In general it achieves its goal, the Sparse hashes are a bit slower than
Ruby’s default (while using less memory), and the Dense Hashes are
faster or as fast as Ruby’s default.
The #each speed is significantly faster than Ruby’s default Hash.
In general if you are wrapping “native” objects like Long’s, it also
wraps them as C-level longs, thus they avoid garbage collection until
the hash itself is collected (the mark and sweep doesn’t have to
traverse over the hash), thus saving even more time.
Enjoy.
Recent changes:
fix hash[0] assignment for 64-bit machines with ints.
-roger-