Interpreter translation speedup
Stefan Matthias Aust
sma at 3plus4.de
Wed May 24 22:04:12 UTC 2000
From the profiles posted earlier, you could see that
Interpreter translate: 'interp.c' doInlining: false
spend about 20% in method Symbol class>>intern:. About 17% of these are
caused by TVariableNode>>bindVariablesIn:. Here, we've a case where a
dictionary of strings would perform much better than a dictionary of
symbols. I first tried to reduce the number of #intern: calls by only
using symbols but that fired back, making the code even slower. So I tried
to remove the need to use asSymbol (which calls intern:) in that bind...
method, using only string keys in all passed dictionaries. That worked!
I hope I found all places where the dictionaries are initialized, modified
or accessed and made sure that strings are used as keys - not symbols
anymore. The change is attached.
With that change, the #intern: calls are reduced to 1.9% and the code runs
about 30% faster (56 seconds instead of 73). It still generates all 22
files without errors but I didn't try to compile the C source. So it might
be the case that I optimized too much.
Good night,
bye
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IntSpeedUp-sma.1.cs.gz
Type: application/octet-stream
Size: 1633 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000525/a6cf90bb/IntSpeedUp-sma.1.cs.obj
-------------- next part --------------
--
Stefan Matthias Aust // Bevor wir fallen, fallen wir lieber auf
More information about the Squeak-dev
mailing list
|