From: Bob Hutchison Date: 2007-10-26T04:45:41+09:00 Subject: Re: pop/push, shift/unshift 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. Cheers, Bob ---- Bob Hutchison -- tumblelog at http:// www.recursive.ca/so/ Recursive Design Inc. -- weblog at http://www.recursive.ca/ hutch http://www.recursive.ca/ -- works on http://www.raconteur.info/ cms-for-static-content/home/