From: Patrick Ritchie Date: 2006-02-21T22:55:14+09:00 Subject: Re: define_method fun --Boundary_(ID_LnqiEkelXnmVgQbnq+fpvw) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT Ah ah, makes total sense now thanks for the explanation. Cheers! Patrick >On Sat, 2006-02-18 at 23:51 +0900, Patrick Ritchie wrote: > > >>Wow, that's impressive, why such huge difference? >> >> > >eval-ing (especially a string) is expensive, basically. > >If you move the eval outside the method body, it means you only pay that >cost once (when defining the method), rather than every time the method >is run. > >-mental > > > > > --Boundary_(ID_LnqiEkelXnmVgQbnq+fpvw)--