fetchClassOf & commonSend?

John M McIntosh johnmci at smalltalkconsulting.com
Tue Dec 11 05:21:35 UTC 2001


At 3:02 AM -0400 10/5/01, Scott A Crosby wrote:
>Date: Sat, 22 Sep 2001 12:40:00 -0700
>From: Andreas Raab <Andreas.Raab at gmx.de>
>Reply-To: squeak-dev at lists.squeakfoundation.org
>To: squeak-dev at lists.squeakfoundation.org
>Subject: RE: Performance profiling results...
>
>Scott,
>
>Interesting results!
>
>  > Over 99% of the invocations of the function 'fetchClassOf' are when
>>  invoked from 'commonSend' in the interpreter. (approximately
>>  350 million).
>
>Yup. I see the culprit, it's
>
>	receiverClass := lkupClass := self fetchClassOf: rcvr.
>
>which doesn't get inlined properly. Should be rewritten as
>
>	lkupClass := self fetchClassOf: rcvr.
>	receiverClass := lkupClass.
>
>to eliminate the call.


Ah, did we ever fix this? and get it into the update stream?

Doing benchmarks and sure enough my interp.c calls out 293 million 
times to fetchClassOf for the test I'm doing...

Also 161 million calls to ioMSecs or 272,923 calls per second! but I 
need to investigate that more...

Mind what I'm seeing was 15% of the time in the mach-o was taken to 
calculate macho-carbon milliseconds. Using gettimeofday is much more 
efficient. 5%+  was taken in pthreads, that's fixed too.

-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================




More information about the Squeak-dev mailing list