Re: Squeak and Pharo speed differences

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

SergeStinckwich
There is an issue about incorporating Squeak arithmetic changes in Pharo:

I start to understand what could be done and could not find time to do the changes.
You are welcome if you want to help.


On Fri, May 15, 2020 at 12:48 PM Shaping <[hidden email]> wrote:

Hi all.

 

 

Squeak 5.3: 

  Time millisecondsToRun: [ 100000 factorial  ] 6250

 

Pharo 8:

  Time millisecondsToRun: [ 100000 factorial  ] 7736

 

Why the difference?

 

Squeak 5.3 release notes describe arithmetic improvements.  Nice.  I crunch very big numbers, and these improvements therefore have value.  Why would they not be included in OSVM (forked or not) and the basic class-set for both Squeak and Pharo?

 

Playing with Squeak 5.3, I’ve noticed that the GUI is snappier.  Browser ergonomics are better too (for me at least), but that can be fixed/tuned in either environ to suit the developer.  (Still that’s some work I prefer not to do.)  Pharo GUIs are now generally slower, except for the Launcher, which is delightfully quick because it is written in Spec2.  I presume that all Pharo GUIs will eventually (ETA?) be written in Spec2 and that Pharo will then be quick in all its GUIs.  The obvious question is:  Will Squeak be improving GUI look/behavior and speed with Spec2?  If not, can I load Spec2 into Squeak so that I can do new GUI work there?

 

Both Squeak and Pharo have slow text selection.  Pick any word in any pane, and double click it to select it.  When I do this, I sense a 75 to 100 ms latency between the end of the double click and the selection highlight appearing on the word.   I thought I’d entered a wormhole.  So I did the same experiment in VW 8.3.2, VS Code, and Notepad, and all three showed undetectable latencies.   This matters to me.  I’m trying to port from VW to Pharo or Squeak (for a really long time now), and can’t push myself past the text-selection delay problem.  Can text-selection speed be improved to the level of VW’s?   Can someone sketch the algo used and/or point me to the right class/methods. 

 

The Squeak debugging experience step-to-step is much quicker.  The latencies in Pharo after button- release are very long.  I estimate 100 to 150 ms.   That’s too long for me to work productively.  I lose my mental thread with many of those delays, and have to restart the thought.  It’s a serious problem, caused mostly by acclimation to no detectable latency for many years (Dolphin and VW have quick GUIs).  Is speeding up the Pharo debugger with Spec2 a priority?  I can’t think of a better GUI-related priority for Pharo.

 

 

Not speed-related:

 

-  How can I load additional fonts into Squeak?  Pharo does this with the font dialog’s Update button.

 

- Where in the Squeak and Pharo images can I change mouse-selection behavior to be leading-edge?  Some of the Squeak panes have this; others don’t.  I want leading-edge action in all panes, and wish the feature were in Preferences/Settings.

 

 

 

Shaping

 

 

 

 

 

 

 

 

 



--
Serge Stinckwic
​h​
https://twitter.com/SergeStinckwich
Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Shaping1

There is an issue about incorporating Squeak arithmetic changes in Pharo:

 

I start to understand what could be done and could not find time to do the changes.

You are welcome if you want to help.

 

 

Arithmetic speed is important if most of one’s work is math and modeling.

 

I want to help, but need to port first from VW, and I’m trying to choose Squeak or Pharo.  Both have speed problems.  Squeak has fewer, but Pharo could be much faster with broad use of Spec2.

 

Would reintegrating Squeak and Pharo development make more sense?

 

This change would effectively create more devs willing to work on any problem.  This change would also prevent fracturing of feature-sets across the two Smalltalks from happening in the first place.

 

Why can’t the OSVM be a single, unforked, maxed-out VM with all the best and fastest features working in Squeak and Pharo?   Why did the split happen?  It looks like a bad use of energy in a community that is small and needs to use its human resources efficiently.

 

Squeak and Pharo GUI styles are different.  So be it.  Can’t the GUI frameworks and conventions be separated in the same image, and configured as desired in GUI sections of Settings?

 

 

Shaping 

 

 

On Fri, May 15, 2020 at 12:48 PM Shaping <[hidden email]> wrote:

Hi all.

 

 

Squeak 5.3: 

  Time millisecondsToRun: [ 100000 factorial  ] 6250

 

Pharo 8:

  Time millisecondsToRun: [ 100000 factorial  ] 7736

 

Why the difference?

 

Squeak 5.3 release notes describe arithmetic improvements.  Nice.  I crunch very big numbers, and these improvements therefore have value.  Why would they not be included in OSVM (forked or not) and the basic class-set for both Squeak and Pharo?

 

Playing with Squeak 5.3, I’ve noticed that the GUI is snappier.  Browser ergonomics are better too (for me at least), but that can be fixed/tuned in either environ to suit the developer.  (Still that’s some work I prefer not to do.)  Pharo GUIs are now generally slower, except for the Launcher, which is delightfully quick because it is written in Spec2.  I presume that all Pharo GUIs will eventually (ETA?) be written in Spec2 and that Pharo will then be quick in all its GUIs.  The obvious question is:  Will Squeak be improving GUI look/behavior and speed with Spec2?  If not, can I load Spec2 into Squeak so that I can do new GUI work there?

 

Both Squeak and Pharo have slow text selection.  Pick any word in any pane, and double click it to select it.  When I do this, I sense a 75 to 100 ms latency between the end of the double click and the selection highlight appearing on the word.   I thought I’d entered a wormhole.  So I did the same experiment in VW 8.3.2, VS Code, and Notepad, and all three showed undetectable latencies.   This matters to me.  I’m trying to port from VW to Pharo or Squeak (for a really long time now), and can’t push myself past the text-selection delay problem.  Can text-selection speed be improved to the level of VW’s?   Can someone sketch the algo used and/or point me to the right class/methods. 

 

The Squeak debugging experience step-to-step is much quicker.  The latencies in Pharo after button- release are very long.  I estimate 100 to 150 ms.   That’s too long for me to work productively.  I lose my mental thread with many of those delays, and have to restart the thought.  It’s a serious problem, caused mostly by acclimation to no detectable latency for many years (Dolphin and VW have quick GUIs).  Is speeding up the Pharo debugger with Spec2 a priority?  I can’t think of a better GUI-related priority for Pharo.

 

 

Not speed-related:

 

-  How can I load additional fonts into Squeak?  Pharo does this with the font dialog’s Update button.

 

- Where in the Squeak and Pharo images can I change mouse-selection behavior to be leading-edge?  Some of the Squeak panes have this; others don’t.  I want leading-edge action in all panes, and wish the feature were in Preferences/Settings.

 

 

 

Shaping

 

 

 

 

 

 

 

 

 



--

Serge Stinckwic

h

https://twitter.com/SergeStinckwich

Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

SergeStinckwich
Arithmetic changes proposed in Squeak have no relationships to VM.


On Fri, May 15, 2020 at 2:09 PM Shaping <[hidden email]> wrote:

There is an issue about incorporating Squeak arithmetic changes in Pharo:

 

I start to understand what could be done and could not find time to do the changes.

You are welcome if you want to help.

 

 

Arithmetic speed is important if most of one’s work is math and modeling.

 

I want to help, but need to port first from VW, and I’m trying to choose Squeak or Pharo.  Both have speed problems.  Squeak has fewer, but Pharo could be much faster with broad use of Spec2.

 

Would reintegrating Squeak and Pharo development make more sense?

 

This change would effectively create more devs willing to work on any problem.  This change would also prevent fracturing of feature-sets across the two Smalltalks from happening in the first place.

 

Why can’t the OSVM be a single, unforked, maxed-out VM with all the best and fastest features working in Squeak and Pharo?   Why did the split happen?  It looks like a bad use of energy in a community that is small and needs to use its human resources efficiently.

 

Squeak and Pharo GUI styles are different.  So be it.  Can’t the GUI frameworks and conventions be separated in the same image, and configured as desired in GUI sections of Settings?

 

 

Shaping 

 

 

On Fri, May 15, 2020 at 12:48 PM Shaping <[hidden email]> wrote:

Hi all.

 

 

Squeak 5.3: 

  Time millisecondsToRun: [ 100000 factorial  ] 6250

 

Pharo 8:

  Time millisecondsToRun: [ 100000 factorial  ] 7736

 

Why the difference?

 

Squeak 5.3 release notes describe arithmetic improvements.  Nice.  I crunch very big numbers, and these improvements therefore have value.  Why would they not be included in OSVM (forked or not) and the basic class-set for both Squeak and Pharo?

 

Playing with Squeak 5.3, I’ve noticed that the GUI is snappier.  Browser ergonomics are better too (for me at least), but that can be fixed/tuned in either environ to suit the developer.  (Still that’s some work I prefer not to do.)  Pharo GUIs are now generally slower, except for the Launcher, which is delightfully quick because it is written in Spec2.  I presume that all Pharo GUIs will eventually (ETA?) be written in Spec2 and that Pharo will then be quick in all its GUIs.  The obvious question is:  Will Squeak be improving GUI look/behavior and speed with Spec2?  If not, can I load Spec2 into Squeak so that I can do new GUI work there?

 

Both Squeak and Pharo have slow text selection.  Pick any word in any pane, and double click it to select it.  When I do this, I sense a 75 to 100 ms latency between the end of the double click and the selection highlight appearing on the word.   I thought I’d entered a wormhole.  So I did the same experiment in VW 8.3.2, VS Code, and Notepad, and all three showed undetectable latencies.   This matters to me.  I’m trying to port from VW to Pharo or Squeak (for a really long time now), and can’t push myself past the text-selection delay problem.  Can text-selection speed be improved to the level of VW’s?   Can someone sketch the algo used and/or point me to the right class/methods. 

 

The Squeak debugging experience step-to-step is much quicker.  The latencies in Pharo after button- release are very long.  I estimate 100 to 150 ms.   That’s too long for me to work productively.  I lose my mental thread with many of those delays, and have to restart the thought.  It’s a serious problem, caused mostly by acclimation to no detectable latency for many years (Dolphin and VW have quick GUIs).  Is speeding up the Pharo debugger with Spec2 a priority?  I can’t think of a better GUI-related priority for Pharo.

 

 

Not speed-related:

 

-  How can I load additional fonts into Squeak?  Pharo does this with the font dialog’s Update button.

 

- Where in the Squeak and Pharo images can I change mouse-selection behavior to be leading-edge?  Some of the Squeak panes have this; others don’t.  I want leading-edge action in all panes, and wish the feature were in Preferences/Settings.

 

 

 

Shaping

 

 

 

 

 

 

 

 

 



--

Serge Stinckwic

h

https://twitter.com/SergeStinckwich



--
Serge Stinckwic
​h​
https://twitter.com/SergeStinckwich
Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Shaping1

Arithmetic changes proposed in Squeak have no relationships to VM.

 

The question below is about both the VM and a common basic class-set.  Math-related classes/methods are assumed to be part of that common class-set.  Why is that not so?

 

Shaping

 

On Fri, May 15, 2020 at 2:09 PM Shaping <[hidden email]> wrote:

There is an issue about incorporating Squeak arithmetic changes in Pharo:

 

I start to understand what could be done and could not find time to do the changes.

You are welcome if you want to help.

 

 

Arithmetic speed is important if most of one’s work is math and modeling.

 

I want to help, but need to port first from VW, and I’m trying to choose Squeak or Pharo.  Both have speed problems.  Squeak has fewer, but Pharo could be much faster with broad use of Spec2.

 

Would reintegrating Squeak and Pharo development make more sense?

 

This change would effectively create more devs willing to work on any problem.  This change would also prevent fracturing of feature-sets across the two Smalltalks from happening in the first place.

 

Why can’t the OSVM be a single, unforked, maxed-out VM with all the best and fastest features working in Squeak and Pharo?   Why did the split happen?  It looks like a bad use of energy in a community that is small and needs to use its human resources efficiently.

 

Squeak and Pharo GUI styles are different.  So be it.  Can’t the GUI frameworks and conventions be separated in the same image, and configured as desired in GUI sections of Settings?

 

 

Shaping 

 

 

On Fri, May 15, 2020 at 12:48 PM Shaping <[hidden email]> wrote:

Hi all.

 

 

Squeak 5.3: 

  Time millisecondsToRun: [ 100000 factorial  ] 6250

 

Pharo 8:

  Time millisecondsToRun: [ 100000 factorial  ] 7736

 

Why the difference?

 

Squeak 5.3 release notes describe arithmetic improvements.  Nice.  I crunch very big numbers, and these improvements therefore have value.  Why would they not be included in OSVM (forked or not) and the basic class-set for both Squeak and Pharo?

 

Playing with Squeak 5.3, I’ve noticed that the GUI is snappier.  Browser ergonomics are better too (for me at least), but that can be fixed/tuned in either environ to suit the developer.  (Still that’s some work I prefer not to do.)  Pharo GUIs are now generally slower, except for the Launcher, which is delightfully quick because it is written in Spec2.  I presume that all Pharo GUIs will eventually (ETA?) be written in Spec2 and that Pharo will then be quick in all its GUIs.  The obvious question is:  Will Squeak be improving GUI look/behavior and speed with Spec2?  If not, can I load Spec2 into Squeak so that I can do new GUI work there?

 

Both Squeak and Pharo have slow text selection.  Pick any word in any pane, and double click it to select it.  When I do this, I sense a 75 to 100 ms latency between the end of the double click and the selection highlight appearing on the word.   I thought I’d entered a wormhole.  So I did the same experiment in VW 8.3.2, VS Code, and Notepad, and all three showed undetectable latencies.   This matters to me.  I’m trying to port from VW to Pharo or Squeak (for a really long time now), and can’t push myself past the text-selection delay problem.  Can text-selection speed be improved to the level of VW’s?   Can someone sketch the algo used and/or point me to the right class/methods. 

 

The Squeak debugging experience step-to-step is much quicker.  The latencies in Pharo after button- release are very long.  I estimate 100 to 150 ms.   That’s too long for me to work productively.  I lose my mental thread with many of those delays, and have to restart the thought.  It’s a serious problem, caused mostly by acclimation to no detectable latency for many years (Dolphin and VW have quick GUIs).  Is speeding up the Pharo debugger with Spec2 a priority?  I can’t think of a better GUI-related priority for Pharo.

 

 

Not speed-related:

 

-  How can I load additional fonts into Squeak?  Pharo does this with the font dialog’s Update button.

 

- Where in the Squeak and Pharo images can I change mouse-selection behavior to be leading-edge?  Some of the Squeak panes have this; others don’t.  I want leading-edge action in all panes, and wish the feature were in Preferences/Settings.

 

 

 

Shaping

 

 

 

 

 

 

 

 

 



--

Serge Stinckwic

h

https://twitter.com/SergeStinckwich



--

Serge Stinckwic

h

https://twitter.com/SergeStinckwich

Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Esteban Lorenzano
In reply to this post by SergeStinckwich
Hi, 

Apples and oranges here. 
Yes, both are fruits (perceived speed), but that’s the only point in common :)

Apples and oranges because one thing is the overall performance of the environment and another completely different the perceived execution speed of the GUI.

Still, some answers:

On 15 May 2020, at 06:47, Shaping <[hidden email]> wrote:

Hi all.
 
 
Squeak 5.3:  
  Time millisecondsToRun: [ 100000 factorial  ] 6250
 
Pharo 8:
  Time millisecondsToRun: [ 100000 factorial  ] 7736
 
Why the difference?

I have no idea. But I have to say that IN MY MACHINE: 

Squeak 5.3, just downloade: 
 Time millisecondsToRun: [ 100000 factorial ].  6289

Pharo (9, regular VM): 
 Time millisecondsToRun: [ 100000 factorial ]. "3585"

This surprises me more than you, in fact because I was expecting similar times (VM is the same, after all).

Basically, all this benchmarks are very unreliable and depend a lot on the machine you are running and ultimately, "weather conditions". 

Squeak 5.3 release notes describe arithmetic improvements.  Nice.  I crunch very big numbers, and these improvements therefore have value.  Why would they not be included in OSVM (forked or not) and the basic class-set for both Squeak and Pharo? 

In general , since VM is the same, if changes are in VM they are already in Pharo.

Playing with Squeak 5.3, I’ve noticed that the GUI is snappier.  Browser ergonomics are better too (for me at least), but that can be fixed/tuned in either environ to suit the developer.  (Still that’s some work I prefer not to do.)  Pharo GUIs are now generally slower, except for the Launcher, which is delightfully quick because it is written in Spec2.  I presume that all Pharo GUIs will eventually (ETA?) be written in Spec2 and that Pharo will then be quick in all its GUIs.  The obvious question is:  Will Squeak be improving GUI look/behavior and speed with Spec2?  If not, can I load Spec2 into Squeak so that I can do new GUI work there?

I don’t know about Squeak, this is not the appropriate place to ask Squeak questions. 

But yes, Pharo is in a battle to improve its GUI (we are basically rewriting all tools with Spec2, but even that some times is not enough since Morphic has become bloated, so our fight for performant tools is constant.
Pharo 9 will replace all glamour based tools (Playground, inspector and debugger), plus some more old tools, and all will improve there I think (GTTools are cool, but Glamour was slow).

Both Squeak and Pharo have slow text selection.  Pick any word in any pane, and double click it to select it.  When I do this, I sense a 75 to 100 ms latency between the end of the double click and the selection highlight appearing on the word.   I thought I’d entered a wormhole.  So I did the same experiment in VW 8.3.2, VS Code, and Notepad, and all three showed undetectable latencies.   This matters to me.  I’m trying to port from VW to Pharo or Squeak (for a really long time now), and can’t push myself past the text-selection delay problem.  Can text-selection speed be improved to the level of VW’s?   Can someone sketch the algo used and/or point me to the right class/methods.  

I don’t know… I’m sure is possible, but someone has to do it :)
What I can tell you is that text model/operation is a big concern for us... 

The Squeak debugging experience step-to-step is much quicker.  The latencies in Pharo after button- release are very long.  I estimate 100 to 150 ms.   That’s too long for me to work productively.  I lose my mental thread with many of those delays, and have to restart the thought.  It’s a serious problem, caused mostly by acclimation to no detectable latency for many years (Dolphin and VW have quick GUIs).  Is speeding up the Pharo debugger with Spec2 a priority?  I can’t think of a better GUI-related priority for Pharo.

Yes, it is a priority, but it is still a WIP.
Part of this problems has nothing to do with GUI… thing is even if “debugger” is same concept, our debugger and the old debugger (which squeak continued) have a complete different machinery behind… still, yes we are working. 

 

Not speed-related:
 
-  How can I load additional fonts into Squeak?  Pharo does this with the font dialog’s Update button.

You’ll have to ask in squeak list, the sis not the appropriate place for that :)

- Where in the Squeak and Pharo images can I change mouse-selection behavior to be leading-edge?  Some of the Squeak panes have this; others don’t.  I want leading-edge action in all panes, and wish the feature were in Preferences/Settings. 

I do not understand what that is. 
Still, I guess the right answer would be: if it is not there, being (both) open source projects that are sustained by communities, and being you part of the community, I think it would be a nice contribution for everybody if you absolute need this and you invest some time on doing it. 
I’m sure you will have all help you need to do it in both communities.

Cheers!
Esteban

 
 
 
Shaping


Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Shaping1

 

Squeak 5.3:  

  Time millisecondsToRun: [ 100000 factorial  ] 6250

 

Pharo 8:

  Time millisecondsToRun: [ 100000 factorial  ] 7736

 

Why the difference?

 

I have no idea. But I have to say that IN MY MACHINE: 

 

Squeak 5.3, just downloade: 

 Time millisecondsToRun: [ 100000 factorial ].  6289

 

Pharo (9, regular VM): 

 Time millisecondsToRun: [ 100000 factorial ]. "3585"

 

 

Pharo 9 64-bit:

 Time millisecondsToRun: [ 100000 factorial ].  4074

 

My time is comparable to yours.

 

 

This surprises me more than you, in fact because I was expecting similar times (VM is the same, after all).

 

 

The algos are different:

 

Pharo 8:

Integer>>factorial

                "Answer the factorial of the receiver."

 

                self = 0 ifTrue: [^ 1].

                self > 0 ifTrue: [^ self * (self - 1) factorial].

                self error: 'Not valid for negative integers'

 

 

Pharo 9:

 

Integer>>factorial

| nex nexnext acc |

                "Guard for know cases (0,1,2,error)"

                self < 3

                                ifTrue: [ ^ self < 0

                                                                ifTrue: [ self error: 'Not valid for negative integers' ]

                                                                ifFalse: [ self > 0

                                                                                                ifTrue: [ self ]

                                                                                                ifFalse: [ 1 ] ] ].

                acc := 2.

                nex := 2.

                nexnext := 10.

               

                self // 2 - 1

                                timesRepeat: [ nex := nex + nexnext.

                                                nexnext := nexnext + 8.

                                                acc := acc * nex ].

                self odd

                                ifTrue: [ acc := acc * self ].

                ^ acc

 

 

 

 

In any case, no user of Pharo or Squeak will ever complain that the VM and math classes are too efficient.  Why is there not always just one basic image and VM for both?

 

 

Basically, all this benchmarks are very unreliable and depend a lot on the machine you are running and ultimately, "weather conditions". 

 

 



Squeak 5.3 release notes describe arithmetic improvements.  Nice.  I crunch very big numbers, and these improvements therefore have value.  Why would they not be included in OSVM (forked or not) and the basic class-set for both Squeak and Pharo? 

 

In general , since VM is the same, if changes are in VM they are already in Pharo.

 

Okay.   By “in general” do you mean that forked deviations from a single target VM are few and transient/short-lived?



Playing with Squeak 5.3, I’ve noticed that the GUI is snappier.  Browser ergonomics are better too (for me at least), but that can be fixed/tuned in either environ to suit the developer.  (Still that’s some work I prefer not to do.)  Pharo GUIs are now generally slower, except for the Launcher, which is delightfully quick because it is written in Spec2.  I presume that all Pharo GUIs will eventually (ETA?) be written in Spec2 and that Pharo will then be quick in all its GUIs.  The obvious question is:  Will Squeak be improving GUI look/behavior and speed with Spec2?  If not, can I load Spec2 into Squeak so that I can do new GUI work there?

 

I don’t know about Squeak, this is not the appropriate place to ask Squeak questions. 

 

Where else would we discuss both?  On the Squeak list?  Would mentioning Pharo there also be inappropriate?  Is there a list where both a discussed?  I’m still discussing some Squeak issues with Robert in the context of parallelization of the VM.  That doesn’t seem to be a problem.  He even suggested that I work on the VM in Squeak, which I might do.  So he mentioned Squeak; that seems harmless. 

 

I don’t understand the split.  It looks silly.  Maybe someone can explain the split in terms of technical/architectural advantages, if any exist.

 

But yes, Pharo is in a battle to improve its GUI (we are basically rewriting all tools with Spec2, but even that some times is not enough since Morphic has become bloated, so our fight for performant tools is constant.

 

Pharo 9 will replace all glamour based tools (Playground, inspector and debugger), plus some more old tools, and all will improve there I think (GTTools are cool, but Glamour was slow).

 

The GT stuff is pretty good even if slow.  Do you mean that the same GT GUIs will be re-implemented in Spec2 for greater speed, or will there also be other changes to those GUIs?



Both Squeak and Pharo have slow text selection.  Pick any word in any pane, and double click it to select it.  When I do this, I sense a 75 to 100 ms latency between the end of the double click and the selection highlight appearing on the word.   I thought I’d entered a wormhole.  So I did the same experiment in VW 8.3.2, VS Code, and Notepad, and all three showed undetectable latencies.   This matters to me.  I’m trying to port from VW to Pharo or Squeak (for a really long time now), and can’t push myself past the text-selection delay problem.  Can text-selection speed be improved to the level of VW’s?   Can someone sketch the algo used and/or point me to the right class/methods.  

 

I don’t know… I’m sure is possible, but someone has to do it :)

What I can tell you is that text model/operation is a big concern for us... 

 

Yes, it seems very important.  It’s the only thing stopping my port.



The Squeak debugging experience step-to-step is much quicker.  The latencies in Pharo after button- release are very long.  I estimate 100 to 150 ms.   That’s too long for me to work productively.  I lose my mental thread with many of those delays, and have to restart the thought.  It’s a serious problem, caused mostly by acclimation to no detectable latency for many years (Dolphin and VW have quick GUIs).  Is speeding up the Pharo debugger with Spec2 a priority?  I can’t think of a better GUI-related priority for Pharo.

 

Yes, it is a priority, but it is still a WIP.

Part of this problems has nothing to do with GUI… thing is even if “debugger” is same concept, our debugger and the old debugger (which squeak continued) have a complete different machinery behind… still, yes we are working. 

 

Yes, so it seems.  The Squeak debugger is as nimble and quick as the new Pharo Launcher.   Why wasn’t the Squeak debugger adapted to Pharo when the speed difference was noticed?  It’s not a small difference, and if the slowness is not mostly about a text rendering problem, then adapting the Squeak debugger architecture to Pharo makes sense.

 

 

 

Not speed-related:

 

-  How can I load additional fonts into Squeak?  Pharo does this with the font dialog’s Update button.

 

You’ll have to ask in squeak list, the sis not the appropriate place for that :)

 

Okay.



- Where in the Squeak and Pharo images can I change mouse-selection behavior to be leading-edge?  Some of the Squeak panes have this; others don’t.  I want leading-edge action in all panes, and wish the feature were in Preferences/Settings. 

 

I do not understand what that is. 

 

It’s the behavior I notice first in any GUI interaction.

 

Leading-edge mouse event == button down

Trailing-edge mouse event == button up. 

 

So I want all mouse actions to be on the button-down event.  It’s already done in some places, but the lack of uniformity is a speed problem. 

 

 

Still, I guess the right answer would be: if it is not there, being (both) open source projects that are sustained by communities, and being you part of the community, I think it would be a nice contribution for everybody if you absolute need this and you invest some time on doing it. 

 

It would not be something that needs development.  I’m looking for the spot in the code to make the change.  It’s very simple.  I figure someone knows it because they’ve tweaked it already.  That would save some time.  I think I made the change myself in an older Pharo.  I forgot where I did it.

 

Cheers,

 

Shaping

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Eliot Miranda-2
In reply to this post by Shaping1
Hi Shaping,

_,,,^..^,,,_ (phone)

On May 15, 2020, at 2:18 AM, Shaping <[hidden email]> wrote:



Arithmetic changes proposed in Squeak have no relationships to VM.

 

The question below is about both the VM and a common basic class-set.  Math-related classes/methods are assumed to be part of that common class-set.  Why is that not so?

 

Shaping

 

On Fri, May 15, 2020 at 2:09 PM Shaping <[hidden email]> wrote:

There is an issue about incorporating Squeak arithmetic changes in Pharo:

 

I start to understand what could be done and could not find time to do the changes.

You are welcome if you want to help.

 

 

Arithmetic speed is important if most of one’s work is math and modeling.

 

I want to help, but need to port first from VW, and I’m trying to choose Squeak or Pharo.  Both have speed problems.  Squeak has fewer, but Pharo could be much faster with broad use of Spec2.


Generally, comparing VisualWorks to either Squeak or Pharo or both, what are the most pressing speed problems?  Where is VisualWorks significantly faster than either Squeak or Pharo?  Specifically which VisualWorks VM or lower level facilities are much faster than the Cog VM?  Do you have benchmarks?

 Would reintegrating Squeak and Pharo development make more sense?

 

This change would effectively create more devs willing to work on any problem.  This change would also prevent fracturing of feature-sets across the two Smalltalks from happening in the first place.

 

Why can’t the OSVM be a single, unforked, maxed-out VM with all the best and fastest features working in Squeak and Pharo?   Why did the split happen?  It looks like a bad use of energy in a community that is small and needs to use its human resources efficiently.

 

Squeak and Pharo GUI styles are different.  So be it.  Can’t the GUI frameworks and conventions be separated in the same image, and configured as desired in GUI sections of Settings?

 

 

Shaping 

 

 

On Fri, May 15, 2020 at 12:48 PM Shaping <[hidden email]> wrote:

Hi all.

 

 

Squeak 5.3: 

  Time millisecondsToRun: [ 100000 factorial  ] 6250

 

Pharo 8:

  Time millisecondsToRun: [ 100000 factorial  ] 7736

 

Why the difference?

 

Squeak 5.3 release notes describe arithmetic improvements.  Nice.  I crunch very big numbers, and these improvements therefore have value.  Why would they not be included in OSVM (forked or not) and the basic class-set for both Squeak and Pharo?

 

Playing with Squeak 5.3, I’ve noticed that the GUI is snappier.  Browser ergonomics are better too (for me at least), but that can be fixed/tuned in either environ to suit the developer.  (Still that’s some work I prefer not to do.)  Pharo GUIs are now generally slower, except for the Launcher, which is delightfully quick because it is written in Spec2.  I presume that all Pharo GUIs will eventually (ETA?) be written in Spec2 and that Pharo will then be quick in all its GUIs.  The obvious question is:  Will Squeak be improving GUI look/behavior and speed with Spec2?  If not, can I load Spec2 into Squeak so that I can do new GUI work there?

 

Both Squeak and Pharo have slow text selection.  Pick any word in any pane, and double click it to select it.  When I do this, I sense a 75 to 100 ms latency between the end of the double click and the selection highlight appearing on the word.   I thought I’d entered a wormhole.  So I did the same experiment in VW 8.3.2, VS Code, and Notepad, and all three showed undetectable latencies.   This matters to me.  I’m trying to port from VW to Pharo or Squeak (for a really long time now), and can’t push myself past the text-selection delay problem.  Can text-selection speed be improved to the level of VW’s?   Can someone sketch the algo used and/or point me to the right class/methods. 

 

The Squeak debugging experience step-to-step is much quicker.  The latencies in Pharo after button- release are very long.  I estimate 100 to 150 ms.   That’s too long for me to work productively.  I lose my mental thread with many of those delays, and have to restart the thought.  It’s a serious problem, caused mostly by acclimation to no detectable latency for many years (Dolphin and VW have quick GUIs).  Is speeding up the Pharo debugger with Spec2 a priority?  I can’t think of a better GUI-related priority for Pharo.

 

 

Not speed-related:

 

-  How can I load additional fonts into Squeak?  Pharo does this with the font dialog’s Update button.

 

- Where in the Squeak and Pharo images can I change mouse-selection behavior to be leading-edge?  Some of the Squeak panes have this; others don’t.  I want leading-edge action in all panes, and wish the feature were in Preferences/Settings.

 

 

 

Shaping

 

 

 

 

 

 

 

 

 



--

Serge Stinckwic

h

https://twitter.com/SergeStinckwich



--

Serge Stinckwic

h

https://twitter.com/SergeStinckwich

Reply | Threaded
Open this post in threaded view
|

Squeak and Pharo why the fork - was: Squeak and Pharo speed differences

Jimmie Houchin-5
In reply to this post by Shaping1
On 5/15/20 5:26 AM, Shaping wrote:
I don’t understand the split.  It looks silly.  Maybe someone can explain the split in terms of technical/architectural advantages, if any exist.

 

Cheers,

 

Shaping

I began using Squeak about 20 years ago. And then Pharo when it started. I will explain as best as I can.

The differences do have bearing on architecture and technical things but at the beginning the basis of it all is philosophy. Differences in what you want Squeak/Pharo to be, where you want it go.

Squeak is from Apple Smalltalk. Smalltalk is not simply a language, but began as an OS, an environment and a language. It ran directly on the hardware. Then Smalltalk was ported to operating systems. But still took with it a very OS like environment and world view. It was the world.

This was very much Squeak. Squeak was the world. It was an amazing and interesting environment. It could play mp3s, had MIDI capabilities. It was a very interesting multimedia environment. Bright, colorful, creative.  But it was also a very productive programming environment to build whatever you wanted to build.

All of the people involved in Squeak, loved the productivity of the Smalltalk language and the live environment. You had debates about "Pink plane" vs "Blue plane". What was the direction of the community and the artifact Squeak. There were two large communities with differing opinions on direction.

Alan Kay
The Computer Revolution Hasn't Happened Yet OOPSLA 97 Keynote (VPRI 0719)
https://www.youtube.com/watch?v=aYT2se94eU0

"""
https://pab-data.blogspot.com/2007/03/what-colour-do-you-like-your-objects.html
In Alan Kay's keynote speech at OOPSLA in 1997 he talks about a blue plane and a pink plane. The pink plane represents ideas which are an incremental improvement of existing ideas. The blue plane which runs orthogonal to the pink represents revolutionary ideas that break the old way of doing things, setting you off in a new direction.
"""

Many people had projects and ideas which were very able to be done in Squeak, but did not want the entire OS-like image. ...

Maybe I want a web server.  I don't need to play multimedia files. Have a GUI. etc.
Insert your own application here.

People wanted to build businesses around what they could do with Squeak.

The Pink plane community wanted to begin to clean up Squeak. Break it up into parts which could be reloaded. It wanted a much more modular environment which allowed you to build the image you want for the purpose you intend.

The Blue plane community didn't see any problems with the way it was. They liked it and still do. It fit what they wanted to do with Squeak/Smalltalk. Frequently more research oriented and less business oriented.

Then in the midst of all this you have overlap in individuals who understand both. You also had personality differences and disagreements which developed over years.

Eventually the Pink plane community forked and created Pharo. The foundational community of Squeak (Blue plane) did not want to make the changes the Pink plane community wanted or required.

Pharo is now 12 years or so into its journey. It is not easy losing weight and still keep working. But that is the goal of Pharo. Keep reducing until the entire system can be built up from a base image. And when it gets there. We don't have a problem with from that foundation, being able to build it back up into a Squeak-like image.

I have numerous projects which I am doing in Pharo. One is a trading application. I personally want as little in my image as possible which does not have to do with my trading application. It desires to be as fast as possible, run without failure, and as memory and cpu efficient as I can make it to be in Pharo. I could make and run this application in Squeak. But it would include much that I don't need and don't want. And that is the case in Pharo currently as well. But Pharo has its philosophy and its direction that it is moving towards. At some point in time my trading application will what I want it to be with very little unused code in the image. That might not be until Pharo 10+. I don't know. But there is a vision within Pharo for people to build such applications.

I have not used Squeak in years. And nothing I write here is meant to speak badly about Squeak. I like the Squeak community. They are full of great people. And I do not know how accurate what I write is to the current Squeak. My apologies for any inaccuracies or errors.

Pharo in general is much more pro-business. It is an explicit goal of Pharo.
https://pharo.org/about
https://gforge.inria.fr/frs/download.php/30434/PharoVision.pdf

Both websites give you a feel for who the community is and the orientation of their goals.

As much as re-unification would be nice. I don't know that it will happen. At a minimum, not until the Squeak community could build Squeak from a Pharo kernel image. Then it would be possible. But I don't think likely.

This is just my generalizations in an effort to answer your question. There are people who are in both communities. Both communities in general attempt to cooperate when we can. Both are communities with friendly, amazing people. And both communities have people who have been doing this for a very long time, and that is a very good thing.

Both are completely open source projects which will allow you to do whatever you want within your abilities and resources.

Basically it is simply this. Different visions for the direction of the project and the pursuit of those directions for an extended period of time. This email is an simplification of a lot discussions and debates over a period of years which finally lead to a fork of Squeak.

Hope this helps.

Jimmie Houchin





Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo why the fork - was: Squeak and Pharo speed differences

cedreek
Nicely said 👏

Le 15 mai 2020 à 17:39, Jimmie Houchin <[hidden email]> a écrit :


On 5/15/20 5:26 AM, Shaping wrote:
I don’t understand the split.  It looks silly.  Maybe someone can explain the split in terms of technical/architectural advantages, if any exist.

 

Cheers,

 

Shaping

I began using Squeak about 20 years ago. And then Pharo when it started. I will explain as best as I can.

The differences do have bearing on architecture and technical things but at the beginning the basis of it all is philosophy. Differences in what you want Squeak/Pharo to be, where you want it go.

Squeak is from Apple Smalltalk. Smalltalk is not simply a language, but began as an OS, an environment and a language. It ran directly on the hardware. Then Smalltalk was ported to operating systems. But still took with it a very OS like environment and world view. It was the world.

This was very much Squeak. Squeak was the world. It was an amazing and interesting environment. It could play mp3s, had MIDI capabilities. It was a very interesting multimedia environment. Bright, colorful, creative.  But it was also a very productive programming environment to build whatever you wanted to build.

All of the people involved in Squeak, loved the productivity of the Smalltalk language and the live environment. You had debates about "Pink plane" vs "Blue plane". What was the direction of the community and the artifact Squeak. There were two large communities with differing opinions on direction.

Alan Kay
The Computer Revolution Hasn't Happened Yet OOPSLA 97 Keynote (VPRI 0719)
https://www.youtube.com/watch?v=aYT2se94eU0

"""
https://pab-data.blogspot.com/2007/03/what-colour-do-you-like-your-objects.html
In Alan Kay's keynote speech at OOPSLA in 1997 he talks about a blue plane and a pink plane. The pink plane represents ideas which are an incremental improvement of existing ideas. The blue plane which runs orthogonal to the pink represents revolutionary ideas that break the old way of doing things, setting you off in a new direction.
"""

Many people had projects and ideas which were very able to be done in Squeak, but did not want the entire OS-like image. ...

Maybe I want a web server.  I don't need to play multimedia files. Have a GUI. etc.
Insert your own application here.

People wanted to build businesses around what they could do with Squeak.

The Pink plane community wanted to begin to clean up Squeak. Break it up into parts which could be reloaded. It wanted a much more modular environment which allowed you to build the image you want for the purpose you intend.

The Blue plane community didn't see any problems with the way it was. They liked it and still do. It fit what they wanted to do with Squeak/Smalltalk. Frequently more research oriented and less business oriented.

Then in the midst of all this you have overlap in individuals who understand both. You also had personality differences and disagreements which developed over years.

Eventually the Pink plane community forked and created Pharo. The foundational community of Squeak (Blue plane) did not want to make the changes the Pink plane community wanted or required.

Pharo is now 12 years or so into its journey. It is not easy losing weight and still keep working. But that is the goal of Pharo. Keep reducing until the entire system can be built up from a base image. And when it gets there. We don't have a problem with from that foundation, being able to build it back up into a Squeak-like image.

I have numerous projects which I am doing in Pharo. One is a trading application. I personally want as little in my image as possible which does not have to do with my trading application. It desires to be as fast as possible, run without failure, and as memory and cpu efficient as I can make it to be in Pharo. I could make and run this application in Squeak. But it would include much that I don't need and don't want. And that is the case in Pharo currently as well. But Pharo has its philosophy and its direction that it is moving towards. At some point in time my trading application will what I want it to be with very little unused code in the image. That might not be until Pharo 10+. I don't know. But there is a vision within Pharo for people to build such applications.

I have not used Squeak in years. And nothing I write here is meant to speak badly about Squeak. I like the Squeak community. They are full of great people. And I do not know how accurate what I write is to the current Squeak. My apologies for any inaccuracies or errors.

Pharo in general is much more pro-business. It is an explicit goal of Pharo.
https://pharo.org/about
https://gforge.inria.fr/frs/download.php/30434/PharoVision.pdf

Both websites give you a feel for who the community is and the orientation of their goals.

As much as re-unification would be nice. I don't know that it will happen. At a minimum, not until the Squeak community could build Squeak from a Pharo kernel image. Then it would be possible. But I don't think likely.

This is just my generalizations in an effort to answer your question. There are people who are in both communities. Both communities in general attempt to cooperate when we can. Both are communities with friendly, amazing people. And both communities have people who have been doing this for a very long time, and that is a very good thing.

Both are completely open source projects which will allow you to do whatever you want within your abilities and resources.

Basically it is simply this. Different visions for the direction of the project and the pursuit of those directions for an extended period of time. This email is an simplification of a lot discussions and debates over a period of years which finally lead to a fork of Squeak.

Hope this helps.

Jimmie Houchin





Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Ben Coman
In reply to this post by Shaping1
On Fri, 15 May 2020 at 14:09, Shaping <[hidden email]> wrote:

Why can’t the OSVM be a single, unforked, maxed-out VM with all the best and fastest features working in Squeak and Pharo?   Why did the split happen? 


In very general terms, the fork was due to their being Group A wanting to go one direction
and Group B wanting to go in a different direction. i.e....
B says "We want to do X".
A says "We don't want to do X." 
B says "We really want to do X."
A says "Definitely no."
B says "We really want to do X and actually we're doing it over here."

In essence, Squeak considered backward compatibility of prime importance including the code of some applications that had become entangled in the main code base.    Pharo wanted to "clean the code" by disentangling and stripping those parts.  They also wanted to move to a reproducible-build-system where each change "bootstrapped" a nightly image from an empty file, whereas Squeak continues to use a "continuous evolution" model. And there are more reasons I probably not aware of.
Here is the Pharo Vision document circa 2012 which inspired me  https://hal.inria.fr/hal-01879346/document


It looks like a bad use of energy in a community that is small and needs to use its human resources efficiently.

 
Trying to go one way and dealing with continual pushback and conflict around that is also bad energy.


 I want to help, but need to port first from VW, and I’m trying to choose Squeak or Pharo.  Both have speed problems.  Squeak has fewer, but Pharo could be much faster with broad use of Spec2.

 

Would reintegrating Squeak and Pharo development make more sense?


I think that is not likely.  Both continue to have different goals.  And a significant area where they are likely to continue to diverge is the graphics.  Squeak is likely(?) to stay with Morphic a long while Pharo intends to dump Morphic.
This is one of the reasons that Spec was created - to be independence layer.
IIUC in Pharo 9 Spec is already working on top of a GTK3 backend.

wrt the VM, Pharo want to remove all native-windowing from the VM, so that window opening 
is controlled from the Image via FFI rather than the VM.  This conflicts with Squeak's backward comparability goals.


This change would effectively create more devs willing to work on any problem.  This change would also prevent fracturing of feature-sets across the two Smalltalks from happening in the first place.


I personally had the inspiration that Squeak might be based off the Pharo Headless Bootstrap,
but in the end I didn't find the time to push this further.
 

 Squeak and Pharo GUI styles are different.  So be it.  Can’t the GUI frameworks and conventions be separated in the same image, and configured as desired in GUI sections of Settings?


Pharo currently can use both Morphic and GTK3 for its GUI backend.
Possibly the GTK3 backend would provide some speed benefit (??)

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Eliot Miranda-2
Hi Ben,

On May 15, 2020, at 10:33 AM, Ben Coman <[hidden email]> wrote:


On Fri, 15 May 2020 at 14:09, Shaping <[hidden email]> wrote:

Why can’t the OSVM be a single, unforked, maxed-out VM with all the best and fastest features working in Squeak and Pharo?   Why did the split happen? 


In very general terms, the fork was due to their being Group A wanting to go one direction
and Group B wanting to go in a different direction. i.e....
B says "We want to do X".
A says "We don't want to do X." 
B says "We really want to do X."
A says "Definitely no."
B says "We really want to do X and actually we're doing it over here."

In essence, Squeak considered backward compatibility of prime importance including the code of some applications that had become entangled in the main code base.    Pharo wanted to "clean the code" by disentangling and stripping those parts.  They also wanted to move to a reproducible-build-system where each change "bootstrapped" a nightly image from an empty file, whereas Squeak continues to use a "continuous evolution" model. And there are more reasons I probably not aware of.
Here is the Pharo Vision document circa 2012 which inspired me  https://hal.inria.fr/hal-01879346/document


It looks like a bad use of energy in a community that is small and needs to use its human resources efficiently.

 
Trying to go one way and dealing with continual pushback and conflict around that is also bad energy.


 I want to help, but need to port first from VW, and I’m trying to choose Squeak or Pharo.  Both have speed problems.  Squeak has fewer, but Pharo could be much faster with broad use of Spec2.

 

Would reintegrating Squeak and Pharo development make more sense?


I think that is not likely.  Both continue to have different goals.  And a significant area where they are likely to continue to diverge is the graphics.  Squeak is likely(?) to stay with Morphic a long while Pharo intends to dump Morphic.
This is one of the reasons that Spec was created - to be independence layer.
IIUC in Pharo 9 Spec is already working on top of a GTK3 backend.

wrt the VM, Pharo want to remove all native-windowing from the VM, so that window opening 
is controlled from the Image via FFI rather than the VM.  This conflicts with Squeak's backward comparability goals.

The VM comprises an execution engine, a memory manager (which share an object representation), and an assorted collection of plugins and platform support.  The execution engine and memory manager are the core support for Smalltalk language execution and are shared 100% between Squeak and Pharo.  And I have rearchitected this core, adding a JIT and a much improved object representation and memory manager.  Pharo has made *no change* to this core.

The assorted collection of plugins and platform support are a kit of parts which can be assembled in a variety of configurations, just as a Smalltalk image can be configured in radically different ways to develop and deploy different applications.

It is therefore not true that there is a conflict in backward compatibility.  The core VM is only backward compatible at a source level.  Backward compatibility in the platform is no more than a configuration in the kit of parts.  And the existence of the minheadless minimal core platform support alongside the transitional head Gul platform proves that there need be no conflict.

The Pharo community makes great claims about how different its VM is when in fact the new work that has given us much improved performance and scalability is shared 109% between the two.

This change would effectively create more devs willing to work on any problem.  This change would also prevent fracturing of feature-sets across the two Smalltalks from happening in the first place.


I personally had the inspiration that Squeak might be based off the Pharo Headless Bootstrap,
but in the end I didn't find the time to push this further.
 

 Squeak and Pharo GUI styles are different.  So be it.  Can’t the GUI frameworks and conventions be separated in the same image, and configured as desired in GUI sections of Settings?


Pharo currently can use both Morphic and GTK3 for its GUI backend.
Possibly the GTK3 backend would provide some speed benefit (??)

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Shaping1
In reply to this post by Eliot Miranda-2

Hi Eliot.

 

 

Generally, comparing VisualWorks to either Squeak or Pharo or both, what are the most pressing speed problems?

 

1.  Double-click text selection in both Squeak and Pharo shows a 75-100 ms latency (eye-balled, estimated) between end of double click (button up on second click) and time of highlighting of selected text.  It could be as low as 60 ms, but I doubt it, and that’s still too long.  I can’t track the latency in VW 8.3.2.  It’s too short, probably 30 ms or less, and is under my noise floor.  Notepad latencies are even lower.  The difference between VW and Notepad is not enough to complain about.  Neither is noticeable in passing.  The difference between VW and Pharo/Squeak latencies is a little painful/distracting.  It’s very much in your face, and you are keenly aware that you are waiting for something to happen before you can resume your thoughts about the code.

 

2.  Stepping in the Pharo debugger is slow (Squeak is fine).  The latencies between the step-click event and selection of the next evaluable is a solid 100 ms (again estimated).  Feels more like 150-175 ms much of the time.  This is actually hard to work with. 

 

 Where is VisualWorks significantly faster than either Squeak or Pharo?  

 

VW 8.3.2 faster:

 

1. Text selection. 

 

2. Repeat-key rate in VW is smoother (not perfect; I see a few pauses).  Pharos repeat-key rate is the same or a little slower, there are more pauses, and distribution of those pause-times is slightly wider for Pharo 9, as if event flow isn’t as smooth as it could be (because text/cursor rendering is a not efficient?).  This is a minor issue, not a practical problem.  I did the test in a workspace in both cases.

 

 

Pharo 9 same or faster:

 

Everything else in the GUI, like window openings/closings, menu openings/closings work at nearly the same speed, or Pharo 9 is faster.

 

Opening a system browser in VW 8.3.2 and Pharo 9 takes about the same time.  If you scrutinize, you can see that Pharo system browser open times are often about 2/3 to 4/5 of the VW times.  This action is never faster in VW. 

 

Popup menus in Pharo 9 are noticeably faster than those in VW 8.3.2.   Instant--delightful.

 

 

Specifically which VisualWorks VM or lower level facilities are much faster than the Cog VM?  Do you have benchmarks?

 

No, I don’t, but I find subject interesting, and would like to pursue it.  I’m trying to get some pressing work done in VW (as I contemplate jumping ship to Pharo/Squeak).  It’s not a good time for excursions, but here I am playing with Squeak/Pharo, anyway.  I want to dig deeper at some future date.

 

Do you have a specific procedure you like to use when benchmarking the VW VM? 

 

 

Shaping



Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Shaping1
In reply to this post by Eliot Miranda-2

I forgot to mention that Pharo Zinc with all those primitives produces an HTTP data transfer rate (CSV data) twice as fast as VW’s HTTP client.  I tested it many times.  Pharo HTTP (Zinc) is consistently 2x faster than VW HTTP.  This is probably more about the judicious use of primitives than the execution engine, JIT, or MM. 

 

This is another good reason to do a port.

 

Also, Pharo’s WebSocket implementation works very well, and is a standalone Smalltalk client.  No such thing exists in VW.  It’s all JS, which has been a source of frustration, and is another good reason to port.

 

 

Shaping

 

 

 

 

 

Hi Eliot.

 

 

Generally, comparing VisualWorks to either Squeak or Pharo or both, what are the most pressing speed problems?

 

1.  Double-click text selection in both Squeak and Pharo shows a 75-100 ms latency (eye-balled, estimated) between end of double click (button up on second click) and time of highlighting of selected text.  It could be as low as 60 ms, but I doubt it, and that’s still too long.  I can’t track the latency in VW 8.3.2.  It’s too short, probably 30 ms or less, and is under my noise floor.  Notepad latencies are even lower.  The difference between VW and Notepad is not enough to complain about.  Neither is noticeable in passing.  The difference between VW and Pharo/Squeak latencies is a little painful/distracting.  It’s very much in your face, and you are keenly aware that you are waiting for something to happen before you can resume your thoughts about the code.

 

2.  Stepping in the Pharo debugger is slow (Squeak is fine).  The latencies between the step-click event and selection of the next evaluable is a solid 100 ms (again estimated).  Feels more like 150-175 ms much of the time.  This is actually hard to work with. 

 

 Where is VisualWorks significantly faster than either Squeak or Pharo?  

 

VW 8.3.2 faster:

 

1. Text selection. 

 

2. Repeat-key rate in VW is smoother (not perfect; I see a few pauses).  Pharos repeat-key rate is the same or a little slower, there are more pauses, and distribution of those pause-times is slightly wider for Pharo 9, as if event flow isn’t as smooth as it could be (because text/cursor rendering is a not efficient?).  This is a minor issue, not a practical problem.  I did the test in a workspace in both cases.

 

 

Pharo 9 same or faster:

 

Everything else in the GUI, like window openings/closings, menu openings/closings work at nearly the same speed, or Pharo 9 is faster.

 

Opening a system browser in VW 8.3.2 and Pharo 9 takes about the same time.  If you scrutinize, you can see that Pharo system browser open times are often about 2/3 to 4/5 of the VW times.  This action is never faster in VW. 

 

Popup menus in Pharo 9 are noticeably faster than those in VW 8.3.2.   Instant--delightful.

 

 

Specifically which VisualWorks VM or lower level facilities are much faster than the Cog VM?  Do you have benchmarks?

 

No, I don’t, but I find subject interesting, and would like to pursue it.  I’m trying to get some pressing work done in VW (as I contemplate jumping ship to Pharo/Squeak).  It’s not a good time for excursions, but here I am playing with Squeak/Pharo, anyway.  I want to dig deeper at some future date.

 

Do you have a specific procedure you like to use when benchmarking the VW VM? 

 

 

Shaping

 

Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Ben Coman
In reply to this post by Eliot Miranda-2


On Sat, 16 May 2020 at 12:56, Eliot Miranda <[hidden email]> wrote:
Hi Ben,

On May 15, 2020, at 10:33 AM, Ben Coman <[hidden email]> wrote:
On Fri, 15 May 2020 at 14:09, Shaping <[hidden email]> wrote:

 

Would reintegrating Squeak and Pharo development make more sense?


I think that is not likely.  Both continue to have different goals.  And a significant area where they are likely to continue to diverge is the graphics.  Squeak is likely(?) to stay with Morphic a long while Pharo intends to dump Morphic.
This is one of the reasons that Spec was created - to be independence layer.
IIUC in Pharo 9 Spec is already working on top of a GTK3 backend.

wrt the VM, Pharo want to remove all native-windowing from the VM, so that window opening 
is controlled from the Image via FFI rather than the VM.  This conflicts with Squeak's backward comparability goals.

The VM comprises an execution engine[1], a memory manager[2] (which share an object representation), and an assorted collection of plugins and platform support[3].  The execution engine and memory manager are the core support for Smalltalk language execution and are shared 100% between Squeak and Pharo.  And I have rearchitected this core, adding a JIT and a much improved object representation and memory manager.  Pharo has made *no change* to this core.

The assorted collection of plugins and platform support are a kit of parts which can be assembled in a variety of configurations, just as a Smalltalk image can be configured in radically different ways to develop and deploy different applications.

It is therefore not true that there is a conflict in backward compatibility.  The core VM is only backward compatible at a source level.  Backward compatibility in the platform is no more than a configuration in the kit of parts.  And the existence of the minheadless minimal core platform support alongside the transitional head Gul platform proves that there need be no conflict.

The Pharo community makes great claims about how different its VM is when in fact the new work that has given us much improved performance and scalability is shared 109% between the two.

Thanks for clarifying that for Shaping.  I did understand that [1] and [2] are the same for SqueakVM and PharoVM.  My point was that IIUC Pharo is dropping some significant parts of [3] from their VM, so a Squeak/Pharo reintegration into a common Image running on a single VM binary could not run old Squeak images.  Such backward compatibility I understand is important to the Squeak community, but not so important to Pharo since Pharo delivers a specific VM for a specific Image Release and uses PharoLauncher to coordinate which VM to use for a given Image.  Just another difference in philosophy the would impede a full Squeak/Pharo reintegration.  

cheers -ben


Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

bernhardHoefner
In reply to this post by Shaping1
It seems that someone needed an optimized factorial-routine…
The problem on the other hand is, that the machine friendly code is much less „didactical" than the human friendly common implementation. To have both I propose to add the human friendly clear and short version as comment. Its a bit like some primitive methods were after the primitive call there is the smalltalk version as well (VisualWorks).

Regards, Bernhard Höfner

...
The algos are different:
 
Pharo 8:
Integer>>factorial
                "Answer the factorial of the receiver."
 
                self = 0 ifTrue: [^ 1].
                self > 0 ifTrue: [^ self * (self - 1) factorial].
                self error: 'Not valid for negative integers'
 
 
Pharo 9:
 
Integer>>factorial
| nex nexnext acc |
                "Guard for know cases (0,1,2,error)"
                self < 3
                                ifTrue: [ ^ self < 0
                                                                ifTrue: [ self error: 'Not valid for negative integers' ]
                                                                ifFalse: [ self > 0
                                                                                                ifTrue: [ self ]
                                                                                                ifFalse: [ 1 ] ] ].
                acc := 2.
                nex := 2.
                nexnext := 10.
                
                self // 2 - 1
                                timesRepeat: [ nex := nex + nexnext.
                                                nexnext := nexnext + 8.
                                                acc := acc * nex ].
                self odd
                                ifTrue: [ acc := acc * self ].
                ^ acc
 
 ...
Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

John Brant-2
And they chose one that wasn’t too optimized. There are much better versions of factorial already implemented in Smalltalk:

   https://medium.com/concerning-pharo/speeding-up-factorial-computation-by-changing-the-order-of-multiplications-f4da3a5576da

   http://forum.world.st/Challenge-Tuning-the-large-factorial-td3588660.html

Both of these pages have optimizations that eliminate 80% or more of the running time where the optimized version below only eliminates ~25% of the slow factorial’s running time. On my machine, running the factorial for 200,000 takes ~20 seconds using the old/slow algorithm (once I fixed it to be recursive on itself and not the modified factorial method), and the new factorial method takes ~15 seconds. Using the #productTo: method above, takes ~4 seconds, and using my revised version on the other page above takes ~3.5 seconds. My personal preference for a factorial included with Pharo would be the #productTo: method above. It is simple to understand and is reasonably fast.


John Brant



> On May 16, 2020, at 11:17 AM, Bernhard Höfner <[hidden email]> wrote:
>
> It seems that someone needed an optimized factorial-routine…
> The problem on the other hand is, that the machine friendly code is much less „didactical" than the human friendly common implementation. To have both I propose to add the human friendly clear and short version as comment. Its a bit like some primitive methods were after the primitive call there is the smalltalk version as well (VisualWorks).
>
> Regards, Bernhard Höfner
>
>> ...
>> The algos are different:
>>  
>> Pharo 8:
>> Integer>>factorial
>>                 "Answer the factorial of the receiver."
>>  
>>                 self = 0 ifTrue: [^ 1].
>>                 self > 0 ifTrue: [^ self * (self - 1) factorial].
>>                 self error: 'Not valid for negative integers'
>>  
>>  
>> Pharo 9:
>>  
>> Integer>>factorial
>> | nex nexnext acc |
>>                 "Guard for know cases (0,1,2,error)"
>>                 self < 3
>>                                 ifTrue: [ ^ self < 0
>>                                                                 ifTrue: [ self error: 'Not valid for negative integers' ]
>>                                                                 ifFalse: [ self > 0
>>                                                                                                 ifTrue: [ self ]
>>                                                                                                 ifFalse: [ 1 ] ] ].
>>                 acc := 2.
>>                 nex := 2.
>>                 nexnext := 10.
>>                
>>                 self // 2 - 1
>>                                 timesRepeat: [ nex := nex + nexnext.
>>                                                 nexnext := nexnext + 8.
>>                                                 acc := acc * nex ].
>>                 self odd
>>                                 ifTrue: [ acc := acc * self ].
>>                 ^ acc
>>  
>>  ...


Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Eliot Miranda-2
In reply to this post by Shaping1
Hi Shaping,

On May 16, 2020, at 4:33 AM, Shaping <[hidden email]> wrote:



Hi Eliot.

 

 

Generally, comparing VisualWorks to either Squeak or Pharo or both, what are the most pressing speed problems?

 

1.  Double-click text selection in both Squeak and Pharo shows a 75-100 ms latency (eye-balled, estimated) between end of double click (button up on second click) and time of highlighting of selected text.  It could be as low as 60 ms, but I doubt it, and that’s still too long.  I can’t track the latency in VW 8.3.2.  It’s too short, probably 30 ms or less, and is under my noise floor.  Notepad latencies are even lower.  The difference between VW and Notepad is not enough to complain about.  Neither is noticeable in passing.  The difference between VW and Pharo/Squeak latencies is a little painful/distracting.  It’s very much in your face, and you are keenly aware that you are waiting for something to happen before you can resume your thoughts about the code.

 

2.  Stepping in the Pharo debugger is slow (Squeak is fine).  The latencies between the step-click event and selection of the next evaluable is a solid 100 ms (again estimated).  Feels more like 150-175 ms much of the time.  This is actually hard to work with. 


Neither of these unequivocally demonstrates VM performance.  Both are more likely to derive from overall GUI architecture.  N particular, VW’s display architecture is a direct stimulus-response i/o model where input results in a transformation producing immediate rendering, whereas Morphic is an animation architecture where input results in a new state but no rendering.  The Morphic GUI is rendered separately on every “step” of the system.  Hence graphics output necessarily lags input on Morphic. So these speed differences have nothing to do with vm performance and everything to do with GUI architecture.

 

 Where is VisualWorks significantly faster than either Squeak or Pharo?  

 

VW 8.3.2 faster:

 

1. Text selection. 

 

2. Repeat-key rate in VW is smoother (not perfect; I see a few pauses).  Pharos repeat-key rate is the same or a little slower, there are more pauses, and distribution of those pause-times is slightly wider for Pharo 9, as if event flow isn’t as smooth as it could be (because text/cursor rendering is a not efficient?).  This is a minor issue, not a practical problem.  I did the test in a workspace in both cases.

 

 

Pharo 9 same or faster:

 

Everything else in the GUI, like window openings/closings, menu openings/closings work at nearly the same speed, or Pharo 9 is faster.

 

Opening a system browser in VW 8.3.2 and Pharo 9 takes about the same time.  If you scrutinize, you can see that Pharo system browser open times are often about 2/3 to 4/5 of the VW times.  This action is never faster in VW. 

 

Popup menus in Pharo 9 are noticeably faster than those in VW 8.3.2.   Instant--delightful.

 

 

Specifically which VisualWorks VM or lower level facilities are much faster than the Cog VM?  Do you have benchmarks?

 

No, I don’t, but I find subject interesting, and would like to pursue it.  I’m trying to get some pressing work done in VW (as I contemplate jumping ship to Pharo/Squeak).  It’s not a good time for excursions, but here I am playing with Squeak/Pharo, anyway.  I want to dig deeper at some future date.

 

Do you have a specific procedure you like to use when benchmarking the VW VM? 


Any VM.  Express the benchmark as a block.  If the benchmark is not trying to measure JIT and/or GC overhead then before the block is run make sure to put the vm in some initialized state wrt hitting and/or GC, eg by voiding the JIT code cache, and/or forcing a scavenge or a global GC.  Then run the block twice, reporting it’s second iteration, to ensure all code is JITted.

If attempting to measure JIT and/or GC overhead then do the same wet getting the vm to some baseline consistent initial state and then ensure, through the relevant introspection primitives, that after the benchmark has run the events desired to be benchmarked have actually taken place.

If a micobenchmark then ensure that eg loop, block invocation, arithmetic, overheads are either minimised wrt the code being benchmarked or subtracted from the code being benchmarked.

i.e. make sure the benchmark is repeatable (benchmark an initial used state). make sure the benchmark measures what is intended to be benchmarked and not some overhead.

 

 

Shaping


Cheers, Eliot,
_,,,^..^,,,_ (phone)
Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Shaping1

1.  Double-click text selection in both Squeak and Pharo shows a 75-100 ms latency (eye-balled, estimated) between end of double click (button up on second click) and time of highlighting of selected text.  It could be as low as 60 ms, but I doubt it, and that’s still too long.  I can’t track the latency in VW 8.3.2.  It’s too short, probably 30 ms or less, and is under my noise floor.  Notepad latencies are even lower.  The difference between VW and Notepad is not enough to complain about.  Neither is noticeable in passing.  The difference between VW and Pharo/Squeak latencies is a little painful/distracting.  It’s very much in your face, and you are keenly aware that you are waiting for something to happen before you can resume your thoughts about the code.

 

2.  Stepping in the Pharo debugger is slow (Squeak is fine).  The latencies between the step-click event and selection of the next evaluable is a solid 100 ms (again estimated).  Feels more like 150-175 ms much of the time.  This is actually hard to work with. 

 

Neither of these unequivocally demonstrates VM performance.

 

I know.  This comment is not about the VM.  VM performance is another issue.  This comment is only about general usability as a function of the latencies, whatever the cause. 

 

 Both are more likely to derive from overall GUI architecture.

 

Yup.

 

In particular, VW’s display architecture is a direct stimulus-response i/o model where input results in a transformation producing immediate rendering, whereas Morphic is an animation architecture where input results in a new state but no rendering.  The Morphic GUI is rendered separately on every “step” of the system.

 

Okay.

 

 Hence graphics output necessarily lags input on Morphic. So these speed differences have nothing to do with vm performance and everything to do with GUI architecture.

 

Both Squeak and Pharo show the same delay for text selection latency.   The architecture difference is not likely causing that. 

 

How do we index or look up the word rectangle to render?   I’m think that is more likely the cause.  Is a map created at method compile time and updated  after text is moved during edits?



 

 Where is VisualWorks significantly faster than either Squeak or Pharo?  

 

VW 8.3.2 faster:

 

1. Text selection. 

 

2. Repeat-key rate in VW is smoother (not perfect; I see a few pauses).  Pharos repeat-key rate is the same or a little slower, there are more pauses, and distribution of those pause-times is slightly wider for Pharo 9, as if event flow isn’t as smooth as it could be (because text/cursor rendering is a not efficient?).  This is a minor issue, not a practical problem.  I did the test in a workspace in both cases.

 

 

Pharo 9 same or faster:

 

Everything else in the GUI, like window openings/closings, menu openings/closings work at nearly the same speed, or Pharo 9 is faster.

 

Opening a system browser in VW 8.3.2 and Pharo 9 takes about the same time.  If you scrutinize, you can see that Pharo system browser open times are often about 2/3 to 4/5 of the VW times.  This action is never faster in VW. 

 

Popup menus in Pharo 9 are noticeably faster than those in VW 8.3.2.   Instant--delightful.

 

 

Specifically which VisualWorks VM or lower level facilities are much faster than the Cog VM?  Do you have benchmarks?

 

No, I don’t, but I find the subject interesting, and would like to pursue it.  I’m trying to get some pressing work done in VW (as I contemplate jumping ship to Pharo/Squeak).  It’s not a good time for excursions, but here I am playing with Squeak/Pharo, anyway.  I want to dig deeper at some future date.

 

Do you have a specific procedure you like to use when benchmarking the VW VM? 

 

Any VM.  Express the benchmark as a block.  If the benchmark is not trying to measure JIT and/or GC overhead then before the block is run make sure to put the vm in some initialized state wrt hitting and/or GC, eg by voiding the JIT code cache,

 

How is the JIT code cache cleared?

and/or forcing a scavenge or a global GC.  Then run the block twice, reporting it’s second iteration, to ensure all code is JITted.

 

Okay, so the above procedure tests execution-engine efficiency apart from JIT and GC efficiency.

 

If attempting to measure JIT and/or GC overhead then do the same wet getting the vm to some baseline consistent initial state

 

Baseline state:  the only thing that comes to mind here is Collect All Garbage.

 

and then ensure, through the relevant introspection primitives,

 

What are these?  What state features am I introspecting after the test?  Sizes of heap subspaces?  I can do Time microsecondsToRun: on the blocks.

 

that after the benchmark has run the events desired to be benchmarked have actually taken place.

 

I’m thinking most checks on state will involve running more Smalltalk, not just primitives.

 

If a micobenchmark then ensure that eg loop, block invocation, arithmetic, overheads are either minimised wrt the code being benchmarked or subtracted from the code being benchmarked.

 

Okay.

 

i.e. make sure the benchmark is repeatable (benchmark an initial used state). make sure the benchmark measures what is intended to be benchmarked and not some overhead.

 

Right.  I don’t see how to guarantee some known starting state except to collect all garbage.

 

 

Shaping

 

Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Eliot Miranda-2
Hi Shaping,

On May 18, 2020, at 6:52 PM, Shaping <[hidden email]> wrote:



1.  Double-click text selection in both Squeak and Pharo shows a 75-100 ms latency (eye-balled, estimated) between end of double click (button up on second click) and time of highlighting of selected text.  It could be as low as 60 ms, but I doubt it, and that’s still too long.  I can’t track the latency in VW 8.3.2.  It’s too short, probably 30 ms or less, and is under my noise floor.  Notepad latencies are even lower.  The difference between VW and Notepad is not enough to complain about.  Neither is noticeable in passing.  The difference between VW and Pharo/Squeak latencies is a little painful/distracting.  It’s very much in your face, and you are keenly aware that you are waiting for something to happen before you can resume your thoughts about the code.

 

2.  Stepping in the Pharo debugger is slow (Squeak is fine).  The latencies between the step-click event and selection of the next evaluable is a solid 100 ms (again estimated).  Feels more like 150-175 ms much of the time.  This is actually hard to work with. 

 

Neither of these unequivocally demonstrates VM performance.

 

I know.  This comment is not about the VM.  VM performance is another issue.  This comment is only about general usability as a function of the latencies, whatever the cause. 

 

 Both are more likely to derive from overall GUI architecture.

 

Yup.

 

In particular, VW’s display architecture is a direct stimulus-response i/o model where input results in a transformation producing immediate rendering, whereas Morphic is an animation architecture where input results in a new state but no rendering.  The Morphic GUI is rendered separately on every “step” of the system.

 

Okay.

 

 Hence graphics output necessarily lags input on Morphic. So these speed differences have nothing to do with vm performance and everything to do with GUI architecture.

 

Both Squeak and Pharo show the same delay for text selection latency.   The architecture difference is not likely causing that. 


Given that both Pharo and Squeak useorphic and hence nothing have the same tender-in-step architecture isn’t the fact that they show the sane performance issue evidence that points to precisely this being the cause?

 How do we index or look up the word rectangle to render?   I’m think that is more likely the cause.  Is a map created at method compile time and updated  after text is moved during edits?


My understanding is that damage rectangles are retrieved, combined to produce a smaller (non-overlapping?) set, and that the entire morph tree is asked to render within these damage rectangles.  You can read the gods for yourself.

 Where is VisualWorks significantly faster than either Squeak or Pharo?  

 

VW 8.3.2 faster:

 

1. Text selection. 

 

2. Repeat-key rate in VW is smoother (not perfect; I see a few pauses).  Pharos repeat-key rate is the same or a little slower, there are more pauses, and distribution of those pause-times is slightly wider for Pharo 9, as if event flow isn’t as smooth as it could be (because text/cursor rendering is a not efficient?).  This is a minor issue, not a practical problem.  I did the test in a workspace in both cases.

 

 

Pharo 9 same or faster:

 

Everything else in the GUI, like window openings/closings, menu openings/closings work at nearly the same speed, or Pharo 9 is faster.

 

Opening a system browser in VW 8.3.2 and Pharo 9 takes about the same time.  If you scrutinize, you can see that Pharo system browser open times are often about 2/3 to 4/5 of the VW times.  This action is never faster in VW. 

 

Popup menus in Pharo 9 are noticeably faster than those in VW 8.3.2.   Instant--delightful.

 

 

Specifically which VisualWorks VM or lower level facilities are much faster than the Cog VM?  Do you have benchmarks?

 

No, I don’t, but I find the subject interesting, and would like to pursue it.  I’m trying to get some pressing work done in VW (as I contemplate jumping ship to Pharo/Squeak).  It’s not a good time for excursions, but here I am playing with Squeak/Pharo, anyway.  I want to dig deeper at some future date.

 

Do you have a specific procedure you like to use when benchmarking the VW VM? 

 

Any VM.  Express the benchmark as a block.  If the benchmark is not trying to measure JIT and/or GC overhead then before the block is run make sure to put the vm in some initialized state wrt hitting and/or GC, eg by voiding the JIT code cache,

 

How is the JIT code cache cleared?


Dialect dependent.  In Squeak/Pharo/Cuis IIRC Smalltalk voidCogVMState.  Can’t remember how it’s done in VW.

and/or forcing a scavenge or a global GC.  Then run the block twice, reporting it’s second iteration, to ensure all code is JITted.

 

Okay, so the above procedure tests execution-engine efficiency apart from JIT and GC efficiency.

 

If attempting to measure JIT and/or GC overhead then do the same wet getting the vm to some baseline consistent initial state

 

Baseline state:  the only thing that comes to mind here is Collect All Garbage.


There’s also Smalltalk garbageCollectMost which just runs a scavenge.  IIRC someInstance has a side effect of running a scavenge in VW.

 

and then ensure, through the relevant introspection primitives,

 

What are these?  What state features am I introspecting after the test?  Sizes of heap subspaces?  I can do Time microsecondsToRun: on the blocks.


In Squeak/Pharo/Cuis see Smalltalk vmParameterAt: or Smalltalk vm parameterAt: and senders.

that after the benchmark has run the events desired to be benchmarked have actually taken place.

 

I’m thinking most checks on state will involve running more Smalltalk, not just primitives.

 

If a micobenchmark then ensure that eg loop, block invocation, arithmetic, overheads are either minimised wrt the code being benchmarked or subtracted from the code being benchmarked.

 

Okay.

 

i.e. make sure the benchmark is repeatable (benchmark an initial used state). make sure the benchmark measures what is intended to be benchmarked and not some overhead.

 

Right.  I don’t see how to guarantee some known starting state except to collect all garbage.


See answers above.

Shaping

Reply | Threaded
Open this post in threaded view
|

Re: Squeak and Pharo speed differences

Shaping1

 

 Hence graphics output necessarily lags input on Morphic. So these speed differences have nothing to do with vm performance and everything to do with GUI architecture.

 

Both Squeak and Pharo show the same delay for text selection latency.   The architecture difference is not likely causing that. 

 

Given that both Pharo and Squeak useorphic and hence nothing have the same tender-in-step architecture isn’t the fact that they show the sane performance issue evidence that points to precisely this being the cause?

 

Yes, but not architecture, by which I think you mean the pushing of events versus the fixed-frequency regular loop in Morphic. I would expect a big variation in the Morphic case, but I don’t know what the fixed frequency is; it could well under the noise floor.   My first thought would be that getting the damage rects is the problem, but I’ve not seen the code.



 How do we index or look up the word rectangle to render?   I’m think that is more likely the cause.  Is a map created at method compile time and updated  after text is moved during edits?

 

My understanding is that damage rectangles are retrieved,

 

Right, but this is the potentially slow part—the retrieving or perhaps more specifically mapping a point to a rectangle containing a contiguous sequence of non-whitespace character (a word).

 

combined to produce a smaller (non-overlapping?) set, and that the entire morph tree is asked to render within these damage rectangles.  You can read the gods for yourself.

 

It’ll be a while.

….

 

I just tried some new experiments.  I should have thought of these earlier.  Character insertion and cursoring in any direction by one character have the same latency.  Collecting the damage rectangle at the cursor position and around the selected word are both taking about the same time as far as I can tell with my eye, and this time is longer than in VW or any Windows app.   But VW doesn’t use the Windows message queue directly.  All incoming Windows events are converted to Smalltalk equivalents and are queued on the Smalltalk side.  And it works well.   Why not mimic that pattern to get the extra speed?  Does something in Squeak/Pharo architecture prevent us from doing that?

 

How do we set a multi-process time profiler running so that we don’t need to eval blocks to get tallies.  I just want to use the editor and watch method hit distribution.  I see the Time profiler window; it seems to need a code snippet to work.

 

 

How is the JIT code cache cleared?

 

Dialect dependent.  In Squeak/Pharo/Cuis IIRC Smalltalk voidCogVMState.

 

Okay.

 

 

 Can’t remember how it’s done in VW.

 

CompiledMethod allInstancesWeakly do: [:compiledMethod | compiledMethod flushCachedVMCode]

 

 

Baseline state:  the only thing that comes to mind here is Collect All Garbage.

 

There’s also Smalltalk garbageCollectMost which just runs a scavenge.  IIRC someInstance has a side effect of running a scavenge in VW.

 

Okay.



 

and then ensure, through the relevant introspection primitives,

 

What are these?  What state features am I introspecting after the test?  Sizes of heap subspaces?  I can do Time microsecondsToRun: on the blocks.

 

In Squeak/Pharo/Cuis see Smalltalk vmParameterAt: or Smalltalk vm parameterAt: and senders.

 

Okay.  I see this list:

 

parameterAt: parameterIndex

                "parameterIndex is a positive integer corresponding to one of the VM's internal

                parameter/metric registers.  Answer with the current value of that register.

                Fail if parameterIndex has no corresponding register.

                VM parameters are numbered as follows:

                1              end (v3)/size(Spur) of old-space (0-based, read-only)

                2              end (v3)/size(Spur) of young/new-space (read-only)

                3              end (v3)/size(Spur) of heap (read-only)

                4              nil (was allocationCount (read-only))

                5              nil (was allocations between GCs (read-write)

                6              survivor count tenuring threshold (read-write)

                7              full GCs since startup (read-only)

                8              total milliseconds in full GCs since startup (read-only)

                9              incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only)

                10           total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only)

                11           tenures of surving objects since startup (read-only)

                12-20 were specific to ikp's JITTER VM, now 12-19 are open for use

                20           utc microseconds at VM start-up (actually at time initialization, which precedes image load).

                21           root table size (read-only)

                22           root table overflows since startup (read-only)

                23           bytes of extra memory to reserve for VM buffers, plugins, etc (stored

                in image file header).

                24           memory threshold above which shrinking object memory (rw)

                25           memory headroom when growing object memory (rw)

                26           interruptChecksEveryNms - force an ioProcessEvents every N milliseconds             (rw) 27  number of times mark loop iterated for current IGC/FGC (read-only)              includes ALL marking

                28           number of times sweep loop iterated for current IGC/FGC (read-only)

                29           number of times make forward loop iterated for current IGC/FGC             (read-only) 30    number of times compact move loop iterated for current    IGC/FGC (read-only)

                31           number of grow memory requests (read-only)

                32           number of shrink memory requests (read-only)

                33           number of root table entries used for current IGC/FGC (read-only)

                34           number of allocations done before current IGC/FGC (read-only)

                35           number of survivor objects after current IGC/FGC (read-only)

                36           millisecond clock when current IGC/FGC completed (read-only)

                37           number of marked objects for Roots of the world, not including Root       Table entries for current IGC/FGC (read-only)

                38           milliseconds taken by current IGC (read-only)

                39           Number of finalization signals for Weak Objects pending when current   IGC/FGC completed (read-only)

                40           BytesPerOop for this image

                41           imageFormatVersion for the VM

                42           number of stack pages in use

                43           desired number of stack pages (stored in image file header, max 65535)

                44           size of eden, in bytes

                45           desired size of eden, in bytes (stored in image file header)

                46           machine code zone size, in bytes (Cog only; otherwise nil)

                47           desired machine code zone size (stored in image file header; Cog only;    otherwise nil)

                48           various header flags. See getCogVMFlags.

                49           max size the image promises to grow the external semaphore table to (0                sets to default, which is 256 as of writing)

                50-51 nil; reserved for VM parameters that persist in the image (such as eden above)

                52           root table capacity

                53           number of segments (Spur only; otherwise nil)

                54           total size of free old space (Spur only, otherwise nil)

                55           ratio of growth and image size at or above which a GC will be performed               post scavenge

                56           number of process switches since startup (read-only)

                57           number of ioProcessEvents calls since startup (read-only)

                58           number of ForceInterruptCheck calls since startup (read-only)

                59           number of check event calls since startup (read-only)

                60           number of stack page overflows since startup (read-only)

                61           number of stack page divorces since startup (read-only) 62           compiled code compactions since startup (read-only; Cog only; otherwise nil)

                63           total milliseconds in compiled code compactions since startup    (read-only; Cog only; otherwise nil)

                64           the number of methods that currently have jitted machine-code

                65           whether the VM supports a certain feature, MULTIPLE_BYTECODE_SETS is bit 0, IMMTABILITY is bit 1

                66           the byte size of a stack page

                67           the max allowed size of old space (Spur only; nil otherwise; 0 implies        no limit except that of the underlying platform)

                68           the average number of live stack pages when scanned by GC (at scavenge/gc/become et al)

                69           the maximum number of live stack pages when scanned by GC (at             scavenge/gc/become et al)

                70           the vmProxyMajorVersion (the interpreterProxy VM_MAJOR_VERSION)

                71           the vmProxyMinorVersion (the interpreterProxy VM_MINOR_VERSION)"

 

 

Shaping