From: "Radosław Bułat" Date: 2009-01-21T02:38:02+09:00 Subject: [ruby-core:21470] Re: ruby 1.9 hashes, etc. On Mon, Jan 19, 2009 at 10:20 PM, Roger Pack wrote: > I noticed in the NEWS file that 1.9 has more compacted hashes--does it then > use just an array until size reaches X? That might be swell. Not only Hashes but also Object, Array, String, Struct, Class had memory diet. I have program where I build red black tree structure and manipulate with it (adding, removing, searching elements). Using ruby1.8.6 memory usage grows to 110MB RSS. The same program runs on ruby1.9.1 almost 3x fasters but what is even more surprising memory usage is only ~20MB RSS! (64bit) I am shocked. If someone wants to look at the source I post gist url: http://gist.github.com/44301 I also made some comparison of the same program in python (rewritten it to) and memory usage for 2.6/3.0 is about 120-150MB RSS. Ruby1.9 was about 2x faster that python3 and about 3x faster than python2.6. All benchmarks results are included in given url. -- Radoslaw Bulat