Trailers speedup (Re: [squeak-dev] The Trunk: Kernel-ul.362.mcz)
siguctua at gmail.com
Sun Jan 3 21:26:24 UTC 2010
Just to make sure i'm not wrong.
initial image - just downloaded squeak3.11-8720-alpha
allMethodsWithSourceString: '== 0'
matchCase: true ] timeToRun
for a first time:
now, changing a single line in CompiledMethodTrailer>>method:
+++ self perform: ('decode' , kind) asSymbol.
--- self perform: (self class trailerKindDecoders at: index).
now, reverting to your version of code:
now reverting again to " ('decode' , kind) asSymbol."
The last two groups of measurements is when files cache is settled up
with our files, so we can trust these numbers more or less.
And the difference is less than 1%, and could be a side (white-noise)
on various factors (network activity, activity of other OS processes
during the test running, number of supernova blasts in the universe
etc etc etc).
P.S. i am not a moron, shouting 'don't touch my code'. In contrary , i
am appreciate when someone takes time and revising my code, because
that's the best way to be sure you did the good thing (tm). But this
is not the case.
The golden rule of optimization: never spend time optimizing the
bottlenecks which will buy you less that 5% speedup. Instead, spend
this time for looking a bottlenecks which can give you more than 5%
Igor Stasenko AKA sig.
More information about the Squeak-dev