Bench comparing Pahro 1.4 and 3.0.
I have run a Sketch script on DRGeo on Pharo 1.4 and 3.0 The script involved a lot of collection operations and object comparison. The leaves results are strange, because the script is the same: On Pharo 1.4: **Leaves** 14.2% {97ms} Array class(Behavior)>>inheritsFrom: 11.4% {77ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 9.7% {66ms} DrGPointIntersectionItem>>= 9.6% {65ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.0% {34ms} OrderedCollection>>at: 5.0% {34ms} Array(SequenceableCollection)>>first 4.7% {32ms} DrGPointFreeItem(DrGMathItem)>>= 3.5% {24ms} OrderedCollection(SequenceableCollection)>>= 2.7% {18ms} Array(Object)>>isKindOf: 2.4% {16ms} OrderedCollection>>do: 2.4% {16ms} OrderedCollection>>size 1.8% {12ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 1.2% {8ms} OrderedCollection>>ensureBoundsFrom:to: 1.2% {8ms} SmallInteger(Number)>>negative On Pharo3: **Leaves** 15.8% {168ms} Array class(Behavior)>>inheritsFrom: 11.4% {121ms} DrGCircle2ptsItem(DrGMathItem)>>= 8.3% {88ms} OrderedCollection>>size 8.3% {88ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 7.5% {80ms} OrderedCollection>>at: 7.1% {76ms} OrderedCollection(SequenceableCollection)>>= 6.6% {70ms} Array(SequenceableCollection)>>first 6.0% {63ms} DrGPointIntersectionItem>>= 5.6% {59ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 1.9% {20ms} OrderedCollection>>do: 1.9% {20ms} OrderedCollection>>ensureBoundsFrom:to: 1.7% {18ms} OrderedCollection(Object)>>isKindOf: 1.5% {16ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 1.5% {16ms} SmallInteger(Number)>>negative True in between DrGeo changes a bit but normally not in the part involved: -- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
Some collection protocols were optimized so your result makes sense. The current performance bottleneck for your application definitely comes from the use of isKindOf: based on your profiles. inheritsFrom: is called by isKindOf: I guess. Now be very careful the current GC has very strange side effect. Did you perform manually a full GC before each bench ? 2014-06-08 20:18 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com>:
I have run a Sketch script on DRGeo on Pharo 1.4 and 3.0 The script involved a lot of collection operations and object comparison.
The leaves results are strange, because the script is the same:
On Pharo 1.4:
**Leaves** 14.2% {97ms} Array class(Behavior)>>inheritsFrom: 11.4% {77ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 9.7% {66ms} DrGPointIntersectionItem>>= 9.6% {65ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.0% {34ms} OrderedCollection>>at: 5.0% {34ms} Array(SequenceableCollection)>>first 4.7% {32ms} DrGPointFreeItem(DrGMathItem)>>= 3.5% {24ms} OrderedCollection(SequenceableCollection)>>= 2.7% {18ms} Array(Object)>>isKindOf: 2.4% {16ms} OrderedCollection>>do: 2.4% {16ms} OrderedCollection>>size 1.8% {12ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 1.2% {8ms} OrderedCollection>>ensureBoundsFrom:to: 1.2% {8ms} SmallInteger(Number)>>negative
On Pharo3:
**Leaves** 15.8% {168ms} Array class(Behavior)>>inheritsFrom: 11.4% {121ms} DrGCircle2ptsItem(DrGMathItem)>>= 8.3% {88ms} OrderedCollection>>size 8.3% {88ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 7.5% {80ms} OrderedCollection>>at: 7.1% {76ms} OrderedCollection(SequenceableCollection)>>= 6.6% {70ms} Array(SequenceableCollection)>>first 6.0% {63ms} DrGPointIntersectionItem>>= 5.6% {59ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 1.9% {20ms} OrderedCollection>>do: 1.9% {20ms} OrderedCollection>>ensureBoundsFrom:to: 1.7% {18ms} OrderedCollection(Object)>>isKindOf: 1.5% {16ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 1.5% {16ms} SmallInteger(Number)>>negative
True in between DrGeo changes a bit but normally not in the part involved:
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
Le 08/06/2014 22:02, Clément Bera a écrit :
Some collection protocols were optimized so your result makes sense.
The profiles show it is faster on 1.4!
The current performance bottleneck for your application definitely comes from the use of isKindOf: based on your profiles. inheritsFrom: is called by isKindOf: I guess.
Although there are use of iskindOf: in the image (384), there are exactly 0 use case from DrGeo source code directly, but still impacted I guess. The situation is not different from 1.4, only inheritsFrom: seems a lot slower in 3.0. What is strange, and may give some indication about what is happening underneath, the script as execution goes on, is slower and slower under Pharo 3.0. With Pharo 1.4, the execution speed is completely constant (as perceived).
Now be very careful the current GC has very strange side effect. Did you perform manually a full GC before each bench ?
Ok. I added at the begining of the script a garbage collection. The result are more or less the same. Now I wonder could it be related to collection during execution: **Memory** old +461,292 bytes young -1,436,444 bytes used -975,152 bytes free +975,152 bytes **GCs** full 0 totalling 0ms (0.0% uptime) incr 48 totalling 213ms (19.0% uptime), avg 4.0ms tenures 8 (avg 6 GCs/tenure) root table 0 overflows Hil
Hi Hilaire, I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII) Nicolai 2014-06-08 22:42 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com>:
Le 08/06/2014 22:02, Clément Bera a écrit :
Some collection protocols were optimized so your result makes sense.
The profiles show it is faster on 1.4!
The current performance bottleneck for your application definitely comes from the use of isKindOf: based on your profiles. inheritsFrom: is called by isKindOf: I guess.
Although there are use of iskindOf: in the image (384), there are exactly 0 use case from DrGeo source code directly, but still impacted I guess. The situation is not different from 1.4, only inheritsFrom: seems a lot slower in 3.0.
What is strange, and may give some indication about what is happening underneath, the script as execution goes on, is slower and slower under Pharo 3.0. With Pharo 1.4, the execution speed is completely constant (as perceived).
Now be very careful the current GC has very strange side effect. Did you perform manually a full GC before each bench ?
Ok. I added at the begining of the script a garbage collection. The result are more or less the same. Now I wonder could it be related to collection during execution:
**Memory** old +461,292 bytes young -1,436,444 bytes used -975,152 bytes free +975,152 bytes
**GCs** full 0 totalling 0ms (0.0% uptime) incr 48 totalling 213ms (19.0% uptime), avg 4.0ms tenures 8 (avg 6 GCs/tenure) root table 0 overflows
Hil
Hi Nicolai, No, check on Smalltalk Hub. You will find instruction to install it as well. The ConfigurationOfDrGeo will not fetch the latest code, but once installed you can update the packages -Core and -Polymorph throught Monticello. Hilaire Script to try for rendering slowness (replace "figure do:" with "MessageTally spyOn:" to measure) |canvas s stats points| points :=Array new: 12. stats := Array new: 12 withAll: 0. canvas := DrGeoCanvas new. canvas scale: 20; fullscreen ; centerTo: 6@10. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red]. figure do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]]. Or another script to stress other aspect: | figure triangle | figure := DrGeoCanvas new fullscreen. triangle := [ ]. triangle := [:p1 :p2 :p3 :n | |s1 s2 s3 perp cercle p4 | s1 := figure segment: p1 to: p2. s2 := (figure segment: p2 to: p3) color: Color red; large. s3 := figure segment: p3 to: p1. perp := figure perpendicular: s3 at: p3. cercle := figure circleCenter: p3 to: p2. p4 := figure altIntersectionOf: cercle and: perp. perp hide. cercle hide. p4 hide. n > 0 ifTrue: [triangle value: p1 value: p3 value: p4 value: n -1]]. MessageTally spyOn: [triangle value: 0@0 value: -1@0 value: -1@1 value: 50] Le 08/06/2014 23:07, Nicolai Hess a écrit :
I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII)
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
Is this a VM issue? I took the same image (drgeo from http://www.drgeo.eu/ download page) and run it with pharo4 vm and pharo 1.4 (from http://www.drgeo.eu/) 520 msec vs 371 msec: Image ----- P:\Pharo4.0\drgeo.image Pharo1.4 Latest update: #14459 Unnamed Virtual Machine --------------- P:\Pharo4.0\Pharo.exe - 512 tallies, 520 msec. .... **Leaves** 13.1% {68ms} Array class(Behavior)>>inheritsFrom: 9.4% {49ms} DrGPointIntersectionItem>>= 8.0% {42ms} DrGPointFreeItem(DrGMathItem)>>= 6.6% {35ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 6.6% {35ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 6.3% {33ms} WeakActionSequence(SequenceableCollection)>>first 5.7% {29ms} OrderedCollection>>at: 4.7% {24ms} OrderedCollection>>size 2.7% {14ms} Array(Object)>>isKindOf: 2.7% {14ms} OrderedCollection(SequenceableCollection)>>= 1.8% {9ms} OrderedCollection>>do: 1.8% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: Image ----- c:\Users\nicolai\Downloads\DrGeo.app\Contents\Resources\drgeo.image Pharo1.4 Latest update: #14459 Unnamed Virtual Machine --------------- c:\Users\nicolai\Downloads\DrGeo.app\drgeo.exe - 366 tallies, 371 msec. **Leaves** 14.5% {54ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 11.5% {43ms} DrGPointIntersectionItem>>= 10.7% {40ms} OrderedCollection class(Behavior)>>inheritsFrom: 6.8% {25ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.7% {21ms} OrderedCollection>>at: 5.5% {20ms} Array(SequenceableCollection)>>first 5.2% {19ms} OrderedCollection>>size 4.6% {17ms} DrGCircle2ptsItem(DrGMathItem)>>= 4.4% {16ms} Array(SequenceableCollection)>>= 3.3% {12ms} Array(Object)>>isKindOf: 2.5% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 2.2% {8ms} SmallInteger>>bitShift: 1.6% {6ms} OrderedCollection>>do: 2014-06-09 12:24 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com>:
Hi Nicolai,
No, check on Smalltalk Hub. You will find instruction to install it as well.
The ConfigurationOfDrGeo will not fetch the latest code, but once installed you can update the packages -Core and -Polymorph throught Monticello.
Hilaire
Script to try for rendering slowness (replace "figure do:" with "MessageTally spyOn:" to measure)
|canvas s stats points|
points :=Array new: 12. stats := Array new: 12 withAll: 0.
canvas := DrGeoCanvas new. canvas scale: 20; fullscreen ; centerTo: 6@10. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red].
figure do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]].
Or another script to stress other aspect:
| figure triangle | figure := DrGeoCanvas new fullscreen. triangle := [ ].
triangle := [:p1 :p2 :p3 :n | |s1 s2 s3 perp cercle p4 | s1 := figure segment: p1 to: p2. s2 := (figure segment: p2 to: p3) color: Color red; large. s3 := figure segment: p3 to: p1. perp := figure perpendicular: s3 at: p3. cercle := figure circleCenter: p3 to: p2. p4 := figure altIntersectionOf: cercle and: perp. perp hide. cercle hide. p4 hide. n > 0 ifTrue: [triangle value: p1 value: p3 value: p4 value: n -1]].
MessageTally spyOn: [triangle value: 0@0 value: -1@0 value: -1@1 value: 50]
Le 08/06/2014 23:07, Nicolai Hess a écrit :
I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII)
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
I do not understand, what is/could be a vm issue? Esteban On 09 Jun 2014, at 18:08, Nicolai Hess <nicolaihess@web.de> wrote:
Is this a VM issue? I took the same image (drgeo from http://www.drgeo.eu/ download page) and run it with pharo4 vm and pharo 1.4 (from http://www.drgeo.eu/)
520 msec vs 371 msec:
Image ----- P:\Pharo4.0\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- P:\Pharo4.0\Pharo.exe
- 512 tallies, 520 msec.
....
**Leaves** 13.1% {68ms} Array class(Behavior)>>inheritsFrom: 9.4% {49ms} DrGPointIntersectionItem>>= 8.0% {42ms} DrGPointFreeItem(DrGMathItem)>>= 6.6% {35ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 6.6% {35ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 6.3% {33ms} WeakActionSequence(SequenceableCollection)>>first 5.7% {29ms} OrderedCollection>>at: 4.7% {24ms} OrderedCollection>>size 2.7% {14ms} Array(Object)>>isKindOf: 2.7% {14ms} OrderedCollection(SequenceableCollection)>>= 1.8% {9ms} OrderedCollection>>do: 1.8% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent:
Image ----- c:\Users\nicolai\Downloads\DrGeo.app\Contents\Resources\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- c:\Users\nicolai\Downloads\DrGeo.app\drgeo.exe
- 366 tallies, 371 msec.
**Leaves** 14.5% {54ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 11.5% {43ms} DrGPointIntersectionItem>>= 10.7% {40ms} OrderedCollection class(Behavior)>>inheritsFrom: 6.8% {25ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.7% {21ms} OrderedCollection>>at: 5.5% {20ms} Array(SequenceableCollection)>>first 5.2% {19ms} OrderedCollection>>size 4.6% {17ms} DrGCircle2ptsItem(DrGMathItem)>>= 4.4% {16ms} Array(SequenceableCollection)>>= 3.3% {12ms} Array(Object)>>isKindOf: 2.5% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 2.2% {8ms} SmallInteger>>bitShift: 1.6% {6ms} OrderedCollection>>do:
2014-06-09 12:24 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com>: Hi Nicolai,
No, check on Smalltalk Hub. You will find instruction to install it as well.
The ConfigurationOfDrGeo will not fetch the latest code, but once installed you can update the packages -Core and -Polymorph throught Monticello.
Hilaire
Script to try for rendering slowness (replace "figure do:" with "MessageTally spyOn:" to measure)
|canvas s stats points|
points :=Array new: 12. stats := Array new: 12 withAll: 0.
canvas := DrGeoCanvas new. canvas scale: 20; fullscreen ; centerTo: 6@10. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red].
figure do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]].
Or another script to stress other aspect:
| figure triangle | figure := DrGeoCanvas new fullscreen. triangle := [ ].
triangle := [:p1 :p2 :p3 :n | |s1 s2 s3 perp cercle p4 | s1 := figure segment: p1 to: p2. s2 := (figure segment: p2 to: p3) color: Color red; large. s3 := figure segment: p3 to: p1. perp := figure perpendicular: s3 at: p3. cercle := figure circleCenter: p3 to: p2. p4 := figure altIntersectionOf: cercle and: perp. perp hide. cercle hide. p4 hide. n > 0 ifTrue: [triangle value: p1 value: p3 value: p4 value: n -1]].
MessageTally spyOn: [triangle value: 0@0 value: -1@0 value: -1@1 value: 50]
Le 08/06/2014 23:07, Nicolai Hess a écrit :
I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII)
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
The script is slower on Pharo3. But I think, this has nothing to do with the pharo3 image, as the same drgeo image is slower on a pharo3 vm than on the pharo 1.4 vm. 2014-06-09 23:10 GMT+02:00 Esteban Lorenzano <estebanlm@gmail.com>:
I do not understand, what is/could be a vm issue?
Esteban
On 09 Jun 2014, at 18:08, Nicolai Hess <nicolaihess@web.de> wrote:
Is this a VM issue? I took the same image (drgeo from http://www.drgeo.eu/ download page) and run it with pharo4 vm and pharo 1.4 (from http://www.drgeo.eu/)
520 msec vs 371 msec:
Image ----- P:\Pharo4.0\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- P:\Pharo4.0\Pharo.exe
- 512 tallies, 520 msec.
....
**Leaves** 13.1% {68ms} Array class(Behavior)>>inheritsFrom: 9.4% {49ms} DrGPointIntersectionItem>>= 8.0% {42ms} DrGPointFreeItem(DrGMathItem)>>= 6.6% {35ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 6.6% {35ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 6.3% {33ms} WeakActionSequence(SequenceableCollection)>>first 5.7% {29ms} OrderedCollection>>at: 4.7% {24ms} OrderedCollection>>size 2.7% {14ms} Array(Object)>>isKindOf: 2.7% {14ms} OrderedCollection(SequenceableCollection)>>= 1.8% {9ms} OrderedCollection>>do: 1.8% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent:
Image ----- c:\Users\nicolai\Downloads\DrGeo.app\Contents\Resources\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- c:\Users\nicolai\Downloads\DrGeo.app\drgeo.exe
- 366 tallies, 371 msec.
**Leaves** 14.5% {54ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 11.5% {43ms} DrGPointIntersectionItem>>= 10.7% {40ms} OrderedCollection class(Behavior)>>inheritsFrom: 6.8% {25ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.7% {21ms} OrderedCollection>>at: 5.5% {20ms} Array(SequenceableCollection)>>first 5.2% {19ms} OrderedCollection>>size 4.6% {17ms} DrGCircle2ptsItem(DrGMathItem)>>= 4.4% {16ms} Array(SequenceableCollection)>>= 3.3% {12ms} Array(Object)>>isKindOf: 2.5% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 2.2% {8ms} SmallInteger>>bitShift: 1.6% {6ms} OrderedCollection>>do:
2014-06-09 12:24 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com> :
Hi Nicolai,
No, check on Smalltalk Hub. You will find instruction to install it as well.
The ConfigurationOfDrGeo will not fetch the latest code, but once installed you can update the packages -Core and -Polymorph throught Monticello.
Hilaire
Script to try for rendering slowness (replace "figure do:" with "MessageTally spyOn:" to measure)
|canvas s stats points|
points :=Array new: 12. stats := Array new: 12 withAll: 0.
canvas := DrGeoCanvas new. canvas scale: 20; fullscreen ; centerTo: 6@10. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red].
figure do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]].
Or another script to stress other aspect:
| figure triangle | figure := DrGeoCanvas new fullscreen. triangle := [ ].
triangle := [:p1 :p2 :p3 :n | |s1 s2 s3 perp cercle p4 | s1 := figure segment: p1 to: p2. s2 := (figure segment: p2 to: p3) color: Color red; large. s3 := figure segment: p3 to: p1. perp := figure perpendicular: s3 at: p3. cercle := figure circleCenter: p3 to: p2. p4 := figure altIntersectionOf: cercle and: perp. perp hide. cercle hide. p4 hide. n > 0 ifTrue: [triangle value: p1 value: p3 value: p4 value: n -1]].
MessageTally spyOn: [triangle value: 0@0 value: -1@0 value: -1@1 value: 50]
Le 08/06/2014 23:07, Nicolai Hess a écrit :
I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII)
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
On 10.06.2014, at 00:08, Nicolai Hess <nicolaihess@web.de> wrote:
The script is slower on Pharo3. But I think, this has nothing to do with the pharo3 image, as the same drgeo image is slower on a pharo3 vm than on the pharo 1.4 vm.
When you say âpharo 1.4 vmâ, do you mean CogVM? Or SqueakVM? And just to be sure (Iâm sure youâve thought of that): did you âwarm upâ the vm? JIT apparently needs that. Max
2014-06-09 23:10 GMT+02:00 Esteban Lorenzano <estebanlm@gmail.com>: I do not understand, what is/could be a vm issue?
Esteban
On 09 Jun 2014, at 18:08, Nicolai Hess <nicolaihess@web.de> wrote:
Is this a VM issue? I took the same image (drgeo from http://www.drgeo.eu/ download page) and run it with pharo4 vm and pharo 1.4 (from http://www.drgeo.eu/)
520 msec vs 371 msec:
Image ----- P:\Pharo4.0\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- P:\Pharo4.0\Pharo.exe
- 512 tallies, 520 msec.
....
**Leaves** 13.1% {68ms} Array class(Behavior)>>inheritsFrom: 9.4% {49ms} DrGPointIntersectionItem>>= 8.0% {42ms} DrGPointFreeItem(DrGMathItem)>>= 6.6% {35ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 6.6% {35ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 6.3% {33ms} WeakActionSequence(SequenceableCollection)>>first 5.7% {29ms} OrderedCollection>>at: 4.7% {24ms} OrderedCollection>>size 2.7% {14ms} Array(Object)>>isKindOf: 2.7% {14ms} OrderedCollection(SequenceableCollection)>>= 1.8% {9ms} OrderedCollection>>do: 1.8% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent:
Image ----- c:\Users\nicolai\Downloads\DrGeo.app\Contents\Resources\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- c:\Users\nicolai\Downloads\DrGeo.app\drgeo.exe
- 366 tallies, 371 msec.
**Leaves** 14.5% {54ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 11.5% {43ms} DrGPointIntersectionItem>>= 10.7% {40ms} OrderedCollection class(Behavior)>>inheritsFrom: 6.8% {25ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.7% {21ms} OrderedCollection>>at: 5.5% {20ms} Array(SequenceableCollection)>>first 5.2% {19ms} OrderedCollection>>size 4.6% {17ms} DrGCircle2ptsItem(DrGMathItem)>>= 4.4% {16ms} Array(SequenceableCollection)>>= 3.3% {12ms} Array(Object)>>isKindOf: 2.5% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 2.2% {8ms} SmallInteger>>bitShift: 1.6% {6ms} OrderedCollection>>do:
2014-06-09 12:24 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com>: Hi Nicolai,
No, check on Smalltalk Hub. You will find instruction to install it as well.
The ConfigurationOfDrGeo will not fetch the latest code, but once installed you can update the packages -Core and -Polymorph throught Monticello.
Hilaire
Script to try for rendering slowness (replace "figure do:" with "MessageTally spyOn:" to measure)
|canvas s stats points|
points :=Array new: 12. stats := Array new: 12 withAll: 0.
canvas := DrGeoCanvas new. canvas scale: 20; fullscreen ; centerTo: 6@10. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red].
figure do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]].
Or another script to stress other aspect:
| figure triangle | figure := DrGeoCanvas new fullscreen. triangle := [ ].
triangle := [:p1 :p2 :p3 :n | |s1 s2 s3 perp cercle p4 | s1 := figure segment: p1 to: p2. s2 := (figure segment: p2 to: p3) color: Color red; large. s3 := figure segment: p3 to: p1. perp := figure perpendicular: s3 at: p3. cercle := figure circleCenter: p3 to: p2. p4 := figure altIntersectionOf: cercle and: perp. perp hide. cercle hide. p4 hide. n > 0 ifTrue: [triangle value: p1 value: p3 value: p4 value: n -1]].
MessageTally spyOn: [triangle value: 0@0 value: -1@0 value: -1@1 value: 50]
Le 08/06/2014 23:07, Nicolai Hess a écrit :
I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII)
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
On Tue Jun 10 06:58:58 2014 Max Leske <maxleske@gmail.com> wrote:
On 10.06.2014, at 00:08, Nicolai Hess <nicolaihess@web.de> wrote:
The script is slower on Pharo3. But I think, this has nothing to do with the pharo3 image, as the same drgeo image is slower on a pharo3 vm than on the pharo 1.4 vm.
When you say âpharo 1.4 vmâ, do you mean CogVM? Or SqueakVM?
And just to be sure (Iâm sure youâve thought of that): did you âwarm upâ the vm? JIT apparently needs that.
Max
cog. No, no warm up. But I ran the script a dozen times. But the maesured times are the same.
2014-06-09 23:10 GMT+02:00 Esteban Lorenzano <estebanlm@gmail.com>: I do not understand, what is/could be a vm issue?
Esteban
On 09 Jun 2014, at 18:08, Nicolai Hess <nicolaihess@web.de> wrote:
Is this a VM issue? I took the same image (drgeo from http://www.drgeo.eu/ download page) and run it with pharo4 vm and pharo 1.4 (from http://www.drgeo.eu/)
520 msec vs 371 msec:
Image ----- P:\Pharo4.0\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- P:\Pharo4.0\Pharo.exe
- 512 tallies, 520 msec.
....
**Leaves** 13.1% {68ms} Array class(Behavior)>>inheritsFrom: 9.4% {49ms} DrGPointIntersectionItem>>= 8.0% {42ms} DrGPointFreeItem(DrGMathItem)>>= 6.6% {35ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 6.6% {35ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 6.3% {33ms} WeakActionSequence(SequenceableCollection)>>first 5.7% {29ms} OrderedCollection>>at: 4.7% {24ms} OrderedCollection>>size 2.7% {14ms} Array(Object)>>isKindOf: 2.7% {14ms} OrderedCollection(SequenceableCollection)>>= 1.8% {9ms} OrderedCollection>>do: 1.8% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent:
Image ----- c:\Users\nicolai\Downloads\DrGeo.app\Contents\Resources\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- c:\Users\nicolai\Downloads\DrGeo.app\drgeo.exe
- 366 tallies, 371 msec.
**Leaves** 14.5% {54ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 11.5% {43ms} DrGPointIntersectionItem>>= 10.7% {40ms} OrderedCollection class(Behavior)>>inheritsFrom: 6.8% {25ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.7% {21ms} OrderedCollection>>at: 5.5% {20ms} Array(SequenceableCollection)>>first 5.2% {19ms} OrderedCollection>>size 4.6% {17ms} DrGCircle2ptsItem(DrGMathItem)>>= 4.4% {16ms} Array(SequenceableCollection)>>= 3.3% {12ms} Array(Object)>>isKindOf: 2.5% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 2.2% {8ms} SmallInteger>>bitShift: 1.6% {6ms} OrderedCollection>>do:
2014-06-09 12:24 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com>: Hi Nicolai,
No, check on Smalltalk Hub. You will find instruction to install it as well.
The ConfigurationOfDrGeo will not fetch the latest code, but once installed you can update the packages -Core and -Polymorph throught Monticello.
Hilaire
Script to try for rendering slowness (replace "figure do:" with "MessageTally spyOn:" to measure)
|canvas s stats points|
points :=Array new: 12. stats := Array new: 12 withAll: 0.
canvas := DrGeoCanvas new. canvas scale: 20; fullscreen ; centerTo: 6@10. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red].
figure do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]].
Or another script to stress other aspect:
| figure triangle | figure := DrGeoCanvas new fullscreen. triangle := [ ].
triangle := [:p1 :p2 :p3Â :n | |s1 s2 s3 perp cercle p4 | s1 := figure segment: p1 to: p2. s2 := (figure segment: p2 to: p3) color: Color red; large. s3 := figure segment: p3 to: p1. perp := figure perpendicular: s3 at: p3. cercle := figure circleCenter: p3 to: p2. p4 := figure altIntersectionOf: cercle and:Â perp. perp hide. cercle hide. p4 hide. n > 0 ifTrue: [triangle value: p1 value: p3 value: p4 value: n -1]].
MessageTally spyOn: [triangle value: 0@0 value: -1@0Â Â Â Â value: -1@1 value: 50]
Le 08/06/2014 23:07, Nicolai Hess a écrit :
I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII)
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
On 10 Jun 2014, at 02:59, Freemail <nicolaihess@web.de> wrote:
On Tue Jun 10 06:58:58 2014 Max Leske <maxleske@gmail.com> wrote:
On 10.06.2014, at 00:08, Nicolai Hess <nicolaihess@web.de> wrote:
The script is slower on Pharo3. But I think, this has nothing to do with the pharo3 image, as the same drgeo image is slower on a pharo3 vm than on the pharo 1.4 vm.
When you say âpharo 1.4 vmâ, do you mean CogVM? Or SqueakVM?
And just to be sure (Iâm sure youâve thought of that): did you âwarm upâ the vm? JIT apparently needs that.
Max
cog. No, no warm up. But I ran the script a dozen times. But the maesured times are the same.
well⦠there is no such thing as âpharo 1.4 vmâ or âpharo 3.0 vmâ, there are different versions, depending on different builds. We know this is confuse and we are slowly moving in the direction of âone vm per image versionâ, but for now, only way to know is to print Smalltalk vm version (in 3.0, I do not remember exactly how it was in 1.4⦠probably Smalltalk vmVersion) also⦠is same image in each run? and finally: even if different times is because of different vms, that does not necessarily means a problem in vm (things can change and optimisations in one place could cause marginally slower times in others), so in that case we will need more digging :) Esteban
2014-06-09 23:10 GMT+02:00 Esteban Lorenzano <estebanlm@gmail.com>: I do not understand, what is/could be a vm issue?
Esteban
On 09 Jun 2014, at 18:08, Nicolai Hess <nicolaihess@web.de> wrote:
Is this a VM issue? I took the same image (drgeo from http://www.drgeo.eu/ download page) and run it with pharo4 vm and pharo 1.4 (from http://www.drgeo.eu/)
520 msec vs 371 msec:
Image ----- P:\Pharo4.0\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- P:\Pharo4.0\Pharo.exe
- 512 tallies, 520 msec.
....
**Leaves** 13.1% {68ms} Array class(Behavior)>>inheritsFrom: 9.4% {49ms} DrGPointIntersectionItem>>= 8.0% {42ms} DrGPointFreeItem(DrGMathItem)>>= 6.6% {35ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 6.6% {35ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 6.3% {33ms} WeakActionSequence(SequenceableCollection)>>first 5.7% {29ms} OrderedCollection>>at: 4.7% {24ms} OrderedCollection>>size 2.7% {14ms} Array(Object)>>isKindOf: 2.7% {14ms} OrderedCollection(SequenceableCollection)>>= 1.8% {9ms} OrderedCollection>>do: 1.8% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent:
Image ----- c:\Users\nicolai\Downloads\DrGeo.app\Contents\Resources\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- c:\Users\nicolai\Downloads\DrGeo.app\drgeo.exe
- 366 tallies, 371 msec.
**Leaves** 14.5% {54ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 11.5% {43ms} DrGPointIntersectionItem>>= 10.7% {40ms} OrderedCollection class(Behavior)>>inheritsFrom: 6.8% {25ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.7% {21ms} OrderedCollection>>at: 5.5% {20ms} Array(SequenceableCollection)>>first 5.2% {19ms} OrderedCollection>>size 4.6% {17ms} DrGCircle2ptsItem(DrGMathItem)>>= 4.4% {16ms} Array(SequenceableCollection)>>= 3.3% {12ms} Array(Object)>>isKindOf: 2.5% {9ms} OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent: 2.2% {8ms} SmallInteger>>bitShift: 1.6% {6ms} OrderedCollection>>do:
2014-06-09 12:24 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com>: Hi Nicolai,
No, check on Smalltalk Hub. You will find instruction to install it as well.
The ConfigurationOfDrGeo will not fetch the latest code, but once installed you can update the packages -Core and -Polymorph throught Monticello.
Hilaire
Script to try for rendering slowness (replace "figure do:" with "MessageTally spyOn:" to measure)
|canvas s stats points|
points :=Array new: 12. stats := Array new: 12 withAll: 0.
canvas := DrGeoCanvas new. canvas scale: 20; fullscreen ; centerTo: 6@10. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red].
figure do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]].
Or another script to stress other aspect:
| figure triangle | figure := DrGeoCanvas new fullscreen. triangle := [ ].
triangle := [:p1 :p2 :p3 :n | |s1 s2 s3 perp cercle p4 | s1 := figure segment: p1 to: p2. s2 := (figure segment: p2 to: p3) color: Color red; large. s3 := figure segment: p3 to: p1. perp := figure perpendicular: s3 at: p3. cercle := figure circleCenter: p3 to: p2. p4 := figure altIntersectionOf: cercle and: perp. perp hide. cercle hide. p4 hide. n > 0 ifTrue: [triangle value: p1 value: p3 value: p4 value: n -1]].
MessageTally spyOn: [triangle value: 0@0 value: -1@0 value: -1@1 value: 50]
Le 08/06/2014 23:07, Nicolai Hess a écrit :
I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII)
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
2014-06-10 8:03 GMT+02:00 Esteban Lorenzano <estebanlm@gmail.com>:
On 10 Jun 2014, at 02:59, Freemail <nicolaihess@web.de> wrote:
On Tue Jun 10 06:58:58 2014 Max Leske <maxleske@gmail.com> wrote:
On 10.06.2014, at 00:08, Nicolai Hess <nicolaihess@web.de> wrote:
The script is slower on Pharo3. But I think, this has nothing to do with the pharo3 image, as the same drgeo image is slower on a pharo3 vm than on the pharo 1.4 vm.
When you say âpharo 1.4 vmâ, do you mean CogVM? Or SqueakVM?
And just to be sure (Iâm sure youâve thought of that): did you âwarm upâ the vm? JIT apparently needs that.
Max
cog. No, no warm up. But I ran the script a dozen times. But the maesured times are the same.
well⦠there is no such thing as âpharo 1.4 vmâ or âpharo 3.0 vmâ, there are different versions, depending on different builds. We know this is confuse and we are slowly moving in the direction of âone vm per image versionâ, but for now, only way to know is to print
Smalltalk vm version (in 3.0, I do not remember exactly how it was in 1.4⦠probably Smalltalk vmVersion) also⦠is same image in each run? and finally: even if different times is because of different vms, that does not necessarily means a problem in vm (things can change and optimisations in one place could cause marginally slower times in others), so in that case we will need more digging :)
Esteban
Sorry, yes of course, not a pharo 1.4 vm. The VM info fro mSystemReporter: Virtual Machine --------------- drgeo.exe CoInterpreter VMMaker-oscog-EstebanLorenzano.160 uuid: bec8cdf0-4e06-4975-8c02-e882fadf4df3 Jun 1 2012, StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.160 uuid: bec8cdf0-4e06-4975-8c02-e882fadf4df3 Jun 1 2012, https://git.gitorious.org/cogvm/blessed.git Commit: 744bfe905c78a1a5d408680a8780367ea77e0549 Date: Fri Jun 1 15:17:41 2012 +0200 By: Esteban Lorenzano <estebanlm@gmail.com> Win32 built on Jun 1 2012 15:45:26 Compiler: 4.5.2 CoInterpreter VMMaker-oscog-EstebanLorenzano.160 uuid: bec8cdf0-4e06-4975-8c02-e882fadf4df3 Jun 1 2012 StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.160 uuid: bec8cdf0-4e06-4975-8c02-e882fadf4df3 Jun 1 2012 Yes, the same ( a copy of) drgeo image in both runs. I don't fully trust the MessageTally timings, or at leas I find it hard to tell where exactly the code runs slow (if at all, as the differences are small). And I don't know if this difference in timing is what Hilaire observed, as he wrote : Pharo3 gets slower and slower for every run. I could not reproduce this one.
2014-06-09 23:10 GMT+02:00 Esteban Lorenzano <estebanlm@gmail.com>: I do not understand, what is/could be a vm issue?
Esteban
On 09 Jun 2014, at 18:08, Nicolai Hess <nicolaihess@web.de> wrote:
Is this a VM issue? I took the same image (drgeo from http://www.drgeo.eu/ download
page)
and run it with pharo4 vm and pharo 1.4 (from http://www.drgeo.eu/)
520 msec vs 371 msec:
Image ----- P:\Pharo4.0\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- P:\Pharo4.0\Pharo.exe
- 512 tallies, 520 msec.
....
**Leaves** 13.1% {68ms} Array class(Behavior)>>inheritsFrom: 9.4% {49ms} DrGPointIntersectionItem>>= 8.0% {42ms} DrGPointFreeItem(DrGMathItem)>>= 6.6% {35ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 6.6% {35ms} DrGCircle2ptsItem(DrGMathItem)>>parentsEqual: 6.3% {33ms} WeakActionSequence(SequenceableCollection)>>first 5.7% {29ms} OrderedCollection>>at: 4.7% {24ms} OrderedCollection>>size 2.7% {14ms} Array(Object)>>isKindOf: 2.7% {14ms} OrderedCollection(SequenceableCollection)>>= 1.8% {9ms} OrderedCollection>>do: 1.8% {9ms}
OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent:
Image ----- c:\Users\nicolai\Downloads\DrGeo.app\Contents\Resources\drgeo.image Pharo1.4 Latest update: #14459 Unnamed
Virtual Machine --------------- c:\Users\nicolai\Downloads\DrGeo.app\drgeo.exe
- 366 tallies, 371 msec.
**Leaves** 14.5% {54ms} OrderedCollection(SequenceableCollection)>>hasEqualElements: 11.5% {43ms} DrGPointIntersectionItem>>= 10.7% {40ms} OrderedCollection class(Behavior)>>inheritsFrom: 6.8% {25ms} DrGPointIntersectionItem(DrGMathItem)>>parentsEqual: 5.7% {21ms} OrderedCollection>>at: 5.5% {20ms} Array(SequenceableCollection)>>first 5.2% {19ms} OrderedCollection>>size 4.6% {17ms}
DrGCircle2ptsItem(DrGMathItem)>>=
4.4% {16ms} Array(SequenceableCollection)>>= 3.3% {12ms} Array(Object)>>isKindOf: 2.5% {9ms}
OrderedCollection(SequenceableCollection)>>indexOf:startingAt:ifAbsent:
2.2% {8ms} SmallInteger>>bitShift: 1.6% {6ms} OrderedCollection>>do:
2014-06-09 12:24 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com>: Hi Nicolai,
No, check on Smalltalk Hub. You will find instruction to install it as well.
The ConfigurationOfDrGeo will not fetch the latest code, but once installed you can update the packages -Core and -Polymorph throught Monticello.
Hilaire
Script to try for rendering slowness (replace "figure do:" with "MessageTally spyOn:" to measure)
|canvas s stats points|
points :=Array new: 12. stats := Array new: 12 withAll: 0.
canvas := DrGeoCanvas new. canvas scale: 20; fullscreen ; centerTo: 6@10. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red].
figure do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]].
Or another script to stress other aspect:
| figure triangle | figure := DrGeoCanvas new fullscreen. triangle := [ ].
triangle := [:p1 :p2 :p3 :n | |s1 s2 s3 perp cercle p4 | s1 := figure segment: p1 to: p2. s2 := (figure segment: p2 to: p3) color: Color red; large. s3 := figure segment: p3 to: p1. perp := figure perpendicular: s3 at: p3. cercle := figure circleCenter: p3 to: p2. p4 := figure altIntersectionOf: cercle and: perp. perp hide. cercle hide. p4 hide. n > 0 ifTrue: [triangle value: p1 value: p3 value: p4 value: n -1]].
MessageTally spyOn: [triangle value: 0@0 value: -1@0 value: -1@1 value: 50]
Le 08/06/2014 23:07, Nicolai Hess a écrit :
I would like to take a look at this, can you provide me your current DrGeo version you are using for this. (I guess it is not http://www.squeaksource.com/DrGeoII)
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
No I did not mean that: in *one* run, it seems the execution is slower at the "end" of the script. My computer is a bit slow, so I can observe more likely such behavior. Thanks Hilaire Le 10/06/2014 09:03, Nicolai Hess a écrit :
And I don't know if this difference in timing is what Hilaire observed, as he wrote : Pharo3 gets slower and slower for every run. I
-- Dr. Geo http://drgeo.eu iStoa - https://launchpad.net/istoa
participants (6)
-
Clément Bera -
Esteban Lorenzano -
Freemail -
Hilaire Fernandes -
Max Leske -
Nicolai Hess