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

Reply via email to