Simple method send benchmark vs Pharo

Chris Double chris.double at double.co.nz
Mon Dec 22 03:48:16 UTC 2014


On Mon, Dec 22, 2014 at 4:41 PM, Chris Double <chris.double at double.co.nz> wrote:
> I don't know what I was doing wrong before but now when I run it I get
> 640ms for the Self version. That's only 2.5 or so slower than Pharo
> which isn't too shabby.

Aha! What was causing the time difference is if I run it in 'time'
first then I get the slow time. If I run it outside of 'time' first
then I get the faster time next time I run it within 'time'. Something
preventing some optimized compilation in 'time'?

"Self 31"  _AddSlots: (| doSomething = ( ^self ). test4 = ( |n <-0| [
n < 100000000 ] whileTrue: [ doSomething. n: n + 1] ) |)
shell
"Self 32" [ test4 ] time.
2870
"Self 33" [ test4 ] time.
2898
"Self 34" test4.
nil
"Self 35" [ test4 ] time.
635

-- 
http://bluishcoder.co.nz



More information about the Self-interest mailing list