ann: release google_hash

4 views
Skip to first unread message

rogerdpack

unread,
Dec 19, 2009, 11:27:34 PM12/19/09
to ruby optimization
As an attempt to optimize for MRI's GC and move elements into hash, my
first attempt is

google_hash

it allows for
a = GoogleHash.new
a[3] = 4
>> a[3]
=> 4

http://www.ruby-forum.com/topic/200649

and allows for #each calls quite a bit faster than 1.9

while storing the keys as native int's

so far so good :)

I guess I could store them as longs, though that wouldn't gain my
anything on 32-bit machines...

-r

Reply all
Reply to author
Forward
0 new messages