From: nobu.nokada@... Date: 2004-04-21T17:54:19+09:00 Subject: Re: efficient collect+compact ? Hi, At Wed, 21 Apr 2004 17:10:09 +0900, Florian Frank wrote in [ruby-talk:97801]: > This all was made worse by the fact that inject calls > rb_gc_force_recycle after every call and you made 1000(!) of them. The > results will be much closer to each other, especially for the small test > values, if you call GC.start after the proc.call in your times loop. This patch certainly improves the performance of Enumerable#inject (and others) to some extent, but not significant. http://nokada.jin.gr.jp/ruby/enum.c.diff -- Nobu Nakada