From: "trans. (T. Onoma)" Date: 2004-12-16T22:25:58+09:00 Subject: Re: [ANN] rand.rb 0.9: Random access methods for Enumerables On Thursday 16 December 2004 03:27 am, Maarten Boonen wrote: | | Just a very small test: (code below) | | -> third is your equivalent code, self[a], self[b] = self[b], self[a] | seems to slow it down quite a lot. | | >ruby test3.rb | | 1.272 | 0.571 | 1.042 | | >Exit code: 0 | >ruby test3.rb | | 1.262 | 0.601 | 1.042 | | >Exit code: 0 | >ruby test3.rb | | 1.302 | 0.551 | 1.041 | | >Exit code: 0 Hmm.. Interesting. Do you mind changing version 3 to use a tmp variable, like yours, and see how they compare again? T.