On 10/25/07, Robert Dober <robert.dober / gmail.com> wrote: > On 10/25/07, Bob Hutchison <hutch / recursive.ca> wrote: > > > > On 25-Oct-07, at 12:40 PM, Eric Mahurin wrote: > > > The problem is that Ruby's COW (copy-on-write) scheme is messed up for > > > arrays. I've found much worse cases performance and memory-wise. Try > > > doing a small #slice on a big array a bunch and modify the small > > > slices. I made a 1.9 patch a couple years ago that fixed the problem > > > and made ALL operations near the front just as fast as the operations > > > on the back. Unfortunately, it never made it in. The way I did it > > > might be unique, not sure. I thought C++ deque does something > > > similiar, but it doesn't. When I find time, I'll try to do the fix > > > again. > > > > Eric, thanks for the information. > > > Now this is all very great but could you share with us what is going > on, right now I just see people complaining that it is broken, no > reference to a bug report, no test code, I feel that this is highly > unfair to Ruby. > > Whatever I am not going to try to reproduce an error that might not > even be there. > I have not found any reference to this on Ruby core, could you please > give a pointer to your patch Eric? > > Robert Here it is from over 2 years ago: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/5861 I believe matz tried incorporating it about a year ago, but there were too many changes in the code since I patched it. You might find a discussion from then. The message above also has a testbench (for some reason it is base-64). Last I tried it, there were some improvements, but there were still some tests that looked clearly leaky and/or slow. Eric