Trailers speedup (Re: [squeak-dev] The Trunk: Kernel-ul.362.mcz)

Igor Stasenko 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

Running
[
   SystemNavigation default
      allMethodsWithSourceString: '== 0'
      matchCase: true ] timeToRun

for a first time:
21449

now, changing a single line in CompiledMethodTrailer>>method:
+++	self perform: ('decode' , kind) asSymbol.
---	self perform: (self class trailerKindDecoders at: index).

19042
18955
20266
21965

now, reverting to your version of code:
18626
18559
18648

now reverting again to " ('decode' , kind) asSymbol."

18787
18708
18668

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)
effect, depending
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%
speedup.

-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list