VM tuning results and a question or two?

John M McIntosh johnmci at smalltalkconsulting.com
Wed Nov 17 09:29:16 UTC 1999


>   Andreas wrote
> Interesting results!

>> 5% increase for bytesCodes per second and an 8% increase in sends per
>> seconds on a PB 3400 PowerPC. This was perhaps the easy part.
>
> What did you change?! Just trying to give the compiler some more hints
> (e.g., by using 'const' and similar)?!

No it's related to global variables, I'll get you some source and details
later. For most routines the number of loads is reduced, and the number
registers required is also reduced. This is reflected in a smaller
instruction count per routine in general. I also sorted, by hand, the global
variables based on usage to give us better cache coherence (doesn't hurt,
but I'm not sure I could measure a difference for this).

>
>> (1) Should this magic number(interruptCheckCounter) be more
>> tied to a timer heuristic?
>
> I think the big problem is the timer accuracy which currently depends on the
> frequency of #checkForInterrupts. If you increase the #interruptCheckCounter
> your timer accuracy will decrease. Though, of course, one could adjust the
> interruptCheckCounter based on whether or not a timer is active (or even how
> far in the future the next timer tick is).
> Good question. For user interrupts, once or twice per second is possibly
> sufficient. For the timer it should be as accurate as possible. For external
> semaphores or finalization it should be as soon as these are signaled.
>

Well right now it seems that this routine is being called an excessive
amount of time.

>> FYI
>> 200Mhz 603e PowerPC PB 3400 (average over 100 tests)
>>
>> Squeak Central Release 11304834 byteCode/Sec 513263 sends/second
>> Optimization pass #1   12154990 byteCode/Sec 560812 sends/second
>
> Is the Squeak Central Release the VM as released or the source code compiled
> with your compiler?! I'm asking because the differences could be due to
> different compilers more than your changes, and also the public release has
> certain hacks applied to make the byte code dispatch more effective.
>
>   Andreas
>

The Squeak Central VM is as released Sunday August 8th 1999 3:11pm, however
I reran the numbers using a newly compiled VM from virgin extruded C code
and get: 11759569.48  byteCode/Sec 532548.91 sends/second

which is a 3% & 5% gain. In my testing on other Macs I noted the byteCode
per second rate only changes somewhat 2-5%, however the sends per seconds is
still a good 5 to 9%.


--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7  E94A EE69 2D21 46FC 3BE6
===========================================================================





More information about the Squeak-dev mailing list