[Pharo-dev] Pharo vs. Squeak performance

Clément Bera bera.clement at gmail.com
Tue Jun 21 03:29:07 EDT 2016

Hello John.

I'm just guessing here. Lacking information. It could be:

Guess 1) the vm versions are different.
What version of Pharo do you use ? (world menu>System>About) Something like:
Latest update: #60030
What version of Squeak do you use ? (world menu>Help>About this system)
Something like:
latest update: #15792
What vm do you use  in both cases ? What does answer ?
In Pharo: Smalltalk vm version
In Squeak: Smalltalk vmVersion

Guess 2) the machine code zone size are different
Can you try in Squeak:
Smalltalk vmParameterAt: 46
and in Pharo:
Smalltalk vm parameterAt: 46.

Is it the same ?
It's the number of bytes of the machine code zone. If you need performance
and you can afford wasting an extra Mb, you can speed it up by doing:
Smalltalk vm parameterAt: 47 put: ((Smalltalk vm parameterAt: 46) * 2)
And then restarting the image.
Don't grow over 2Mb.

Guess 3) the UI is known to be much slower in Pharo. Can you try headless
or after ticking "Server mode" In the Pharo settings in System.

On Tue, Jun 21, 2016 at 1:28 AM, John Brant <brant at refactoryworkers.com>

> I have some code that creates a several hundred MB model. When I run the
> code under Pharo it takes ~2.5 minutes to run. However, if I run the same
> code in Squeak, it takes ~2 minutes. Since my code just uses base
> collections and streams, I thought the times should be very similar between
> the two. After a little investigation, I noticed that even simple things
> like “Object new” can take much more time in Pharo. Here’s an example that
> I executed in Squeak and Pharo:
>         Time millisecondsToRun: [1 to: 100000000 do: [:i | Object new]]
>         Squeak times:
>                 1255 1257 1261 1265 1280 1294 1314 1337 1350 1360
>         Pharo times:
>                 1815 1818 1870 1879 1900 1922 1944 1952 1958 2170
> The results are the first 10 executions sorted by time after opening an
> image. Pharo doesn’t always give these poor results. Occasionally I can get
> times as good a Squeak. For example, I was able to get these times in
> Pharo: 1253, 1284, 1297, 1314, 1317. However, it generally takes ~1.8
> seconds in Pharo vs. the ~1.3 seconds for Squeak. The worst time I got for
> Squeak was in the 1.6 second range. The worst for Pharo was in the 4.3
> second range.
> Does anyone know why Pharo is slower? Is there some memory setting that I
> need to change?
> John Brant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20160621/50037a02/attachment-0002.html>

More information about the Pharo-dev mailing list