From: Robert Dober Date: 2006-09-25T05:13:50+09:00 Subject: Re: Array shift bug ------=_Part_16969_31414053.1159128827356 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/24/06, Zed A. Shaw wrote: > > On Mon, 25 Sep 2006 01:09:10 +0900 > "Eric Mahurin" wrote: > > > On 9/24/06, Nobuyoshi Nakada wrote: > > > > > > Hi, > > > > > > At Sun, 24 Sep 2006 11:52:27 +0900, > > > Devin Mullins wrote in [ruby-talk:216068]: > > > > > > > > Bob Hutchison wrote: > > > > > A short article describing a problem in the implementation of > array > > > > > shift in Ruby 1.8.4 with a simple one-line fix in the C code is > here: > > > > That's half a fix. If you're using shift and push to manage a queue= , > you > > > > still have an ever-growing buffer.* > > > > > > Does this patch fix it? > > > > > This was one of the issues I was addressing in a patch I made a year > ago: > > > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/5861 > > > > In addition to this memory issue with element sharing, I also made > > performance for operating at either end of the array symmetrical (i.e. > > shift/unshift same performance as pop/push). From my testing of perl, > it > > has this now. > > A *year* ago? A whole year? You mean, I've been having this problem, > people have denied it was a problem, they've insulted me, they've told me > I'm full of it for a full on month, called me a liar, large production > operations have been crashing over it, countless hours were wasted trying= to > fix it... > > and someone posted a patch over a year ago to fix it that nobody bothered > to apply? And than he discovered that life was not perfect, he still has not recovere= d compeletely yet. So we hesitate to show him the rest :( Not only that but Eric improved the performance *and* had a test case that > demonstrated the performance enhancement *and* Perl has these changes? > > Please, someone tell me it slipped through the cracks or that Eric is > wrong (doesn't look like it). Open source is not perfect either, and after all you do have the satisfaction that you were right, can you tell me how that feels BTW;) Look at my nice little sig I'll translate it for once, believe me this si= g applies to myself it is not there to insult anybody. -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > Two things are infinite, universe and human stupidity, for what regards the universe I am not yet completely sure. --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_16969_31414053.1159128827356--