[ENH][VM] - faster lookup method (lookupMethodInDictionary:)
John M McIntosh
johnmci at smalltalkconsulting.com
Wed Aug 6 19:13:55 UTC 2003
I had noticed in my benchmarking that lookup method in dictionary gets
called a lot ( a couple of percent of execution time) and the
loopinvolved always checking to see if the hashed dictionary lookup is
nil before looking to see if it is the method we want.
Issue is that check is only required 1/20 of the time, so putting it
after the check for the selector saves a few instructions. Also caching
the niloops in a register is always helpful for loops.
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FasterLookupMethod-JMM.1.cs.gz
Type: application/x-gzip
Size: 1087 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030806/8914ebec/FasterLookupMethod-JMM.1.cs.bin
More information about the Squeak-dev
mailing list
|