On Tue, Jun 21, 2016 at 10:18 PM, John Brant <[email protected]> wrote:
> On 06/21/2016 02:29 AM, Clément Bera wrote: > >> 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: >> Pharo6.0 >> Latest update: #60030 >> What version of Squeak do you use ? (world menu>Help>About this system) >> Something like: >> Squeak5.0 >> latest update: #15792 >> What vm do you use in both cases ? What does answer ? >> In Pharo: Smalltalk vm version >> In Squeak: Smalltalk vmVersion >> > > I just downloaded the latest to test on my Linux machine: > > Pharo6.0 > Latest update: #60101 > > Pharo VM: > 'CoInterpreter VMMaker.oscog-HolgerHansPeterFreyther.1880 uuid: > 16138eb3-2390-40f5-a6c8-15f0494936f8 Jun 21 2016 > StackToRegisterMappingCogit VMMaker.oscog-HolgerHansPeterFreyther.1880 > uuid: 16138eb3-2390-40f5-a6c8-15f0494936f8 Jun 21 2016 > https://github.com/pharo-project/pharo-vm.git Commit: > 9638b0190a9fc01479bfb752becd96edfd253c8c Date: 2016-06-21 12:29:26 +0200 > By: GitHub <[email protected]> Jenkins build #594 > ' > > Squeak: > Image > ----- > /home/brant/Smalltalk/Squeak/SpurTrunkImage.image > Squeak5.1 > latest update: #16066 > Current Change Set: Unnamed1 > Image format 6521 (32 bit) > > Virtual Machine > --------------- > /home/brant/Smalltalk/Squeak/lib/squeak/5.0-3732/squeak > Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives > VMMaker.oscog-eem.1872] > Unix built on May 26 2016 15:18:08 Compiler: 4.4.7 20120313 (Red Hat > 4.4.7-4) > platform sources revision VM: r3732 > http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2016-05-26 13:01:37 > -0700 Plugins: r3730 > http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins > CoInterpreter VMMaker.oscog-eem.1872 uuid: > 6db6d610-b1a5-4f4d-978d-22c917bdb3e4 May 26 2016 > StackToRegisterMappingCogit VMMaker.oscog-eem.1860 uuid: > 4d58d995-ee0c-4330-9190-adfa038e8f24 May 26 2016 > > Starting the image, opening a workspace/playground, and executing "Time > millisecondsToRun: [1 to: 100000000 do: [:i | Object new]]" 10 times, I got > these times in Pharo: > > "2147" "2303" "1177" "1127" "1153" "1179" "1162" "1136" "1262" "1148" > > Closing that image, and doing it again, I got these: > > "2128" "2210" "2239" "2051" "2040" "2070" "2087" "2166" "2060" "2078" > > Doing it once in Squeak, I got: > > 1183 1189 1193 1189 1216 1238 1193 1273 1218 1214 > > I done it a few more times in both, and Squeak always had times from the > upper 1100's to the upper 1200's, but Pharo had times from the low 1100's > to the 2300's. > > 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. >> > > They are both 1MB. > > 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. >> > > This appears to be what is causing the problem. Even though I'm not using > any UI when I run my code, it must be doing something in the background > that is causing the slowdown. When I ran my model code headlessly in > Pharo, it actually finished the 2 minute job a couple seconds faster than > the headless Squeak image (instead of 30 seconds slower). Very interesting. So it's UI-related. If you close all windows but the workspace where you run your code, does it solve the problem ? I believe it tries to update something somehow. > > > > John Brant > >
