[Glass] Weird slowdown with a comparison

Mariano Martinez Peck marianopeck at gmail.com
Wed Dec 11 18:32:34 PST 2013


Hi,

I am profiling some reports that take some time in GemStone and I come to a
place that I find weird. So I want to check with you to see if this is
expected.

| char newline carriageReturn |
char := $a.
newline := Character lf.
carriageReturn := Character cr.
[1 to: 1000000 do:  [ :i |
char == carriageReturn  or: [ char == newline ] .
 ]
] timeToRun

The following code, takes approx 5 ms in Pharo (Cog). While in GemStone it
takes me around 60ms. That is 12 times slower...
Am I doing something wrong? I used #to:do but #timesRepeat got similar
results. I try to not affect GC by putting the stuff before the loop. I
tried to run it several times just in case...

So....is that expected or I am missing something?

Thanks,

-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20131212/df37e891/attachment.html>


More information about the Glass mailing list