From: Michael Selig Date: 2008-10-11T12:33:26+09:00 Subject: [ruby-core:19295] Re: performance of C function calls in 1.8 vs 1.9 On Sat, 11 Oct 2008 12:14:23 +1100, SASADA Koichi wrote: > I committed such an optimization last night :) please check it. Hi, That's fantastic - the performances of "for" and "each" are now quite similar, and as I suspected, for a very small loop like this benchmark, "for" is just marginally slower due to the extra assignment of the dynamic variable to the local. Now: ruby 1.9.0 (2008-10-11 revision 19756) [i686-linux] user system total real for 2.490000 0.000000 2.490000 ( 2.508887) each 2.370000 0.000000 2.370000 ( 2.381762) times 2.380000 0.010000 2.390000 ( 2.420313) Was: ruby 1.9.0 (2008-10-10 revision 19741) [i686-linux] user system total real for 6.030000 0.020000 6.050000 ( 6.074545) each 2.380000 0.000000 2.380000 ( 2.384460) times 2.380000 0.000000 2.380000 ( 2.394605) Much better :) Thanks very much Mike