From: Eric Wong Date: 2009-12-27T11:25:47+09:00 Subject: Re: [ANN] google_hash 0.1.1 -- it has a #each! Roger Pack wrote: > Pleased to announce the initial release of a "google_hash" gem. > > Its goal. To boldly be faster than any hash hash before (cue star trek > TNG theme). > > > Or basically a better hash, either one that is faster or more space > efficient than ruby's default. To attempt this we wrap the google > sparse and dense hashes [1]. > Both these classes are currently more space efficient than a hash, > because they store keys as "native" ints, so the keys no longer affect > GC time, as well as only use 4 bytes instead of 20 (or 8 instead of 40, > on 64 bit). This should release some stress on the GC. In terms of > total memory usage, GoogleHashDense uses more (more buckets), and is > more speedy, and GoogleHashSparse uses less space, and is much more > memory efficient (2 bits per entry, or so I'm told). Hi Roger, Any chance of having one of these can become the default MRI Hash implementation, or even replace most MRI-internal uses of st.c? Much of the st.c stuff inside MRI uses numeric keys. -- Eric Wong