[Glass] Particular code that is much slower than Pharo

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Tue Jan 24 12:28:34 PST 2017


I ran this test using GemStone 3.4.0 and Pharo6.0 on the same hardware 
and came out as only 2x slower: 79ms (G/S) vs 36ms (pharo) .... Allen 
(our vm guy) thought that 3.3 might be a bit faster than 3.2 and sure 
enough, a run on 3.2 came up with 111ms (3x slower). No code gen changes 
have been made in 3.4.0 so the timings are similar.

GemStone is going to be doing a bit more work for #at: than Pharo, since 
we have to worry about faulting in objects and that costs a bit more ...

I plan look at a few other things when I get a chance  ...

Dale

On 01/24/2017 11:42 AM, Mariano Martinez Peck via Glass wrote:
> | array1 another |
> array1 := #( 1 2 3 4 5 6 7 8 9).
> another := #(8 9 10 11 12 115 9 116 117 16 118).
> 10000 timesRepeat: [
> | answer  i j selfSize anotherSize skipTestsTable |
> answer := OrderedCollection new.
> skipTestsTable := array1 collect: [ :each | Array new: another size ]. 
> "all nils"
>
> selfSize := array1 size.
> anotherSize := another size.
> array1 doWithIndex: [:each :selfStart |
> | skipTableAtStart |
> skipTableAtStart := skipTestsTable at: selfStart.
> 1 to: anotherSize do: [ :anotherStart|
> (false or: [ (skipTableAtStart at: anotherStart) isNil]) ifTrue: [
> each = (another at: anotherStart)
> ifTrue: [
> i := selfStart + 1.
> j := anotherStart + 1.
> [ (i <= selfSize and: [ j <= anotherSize ]) and: [ (array1 at: i) = 
> (another at: j)]]
> whileTrue: [
> (skipTestsTable at: i) at: j put: true.
> i := i + 1.
> j := j + 1. ].
> answer add: { selfStart. anotherStart. (i - selfStart). i - 1 }
> ]  ]
> ]
> ].
> answer asArray
>
> ]
> ] timeToRun

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20170124/65a9954f/attachment.html>


More information about the Glass mailing list