TerseMan challenge

David N. Smith (IBM) dnsmith at watson.ibm.com
Tue Jan 11 00:14:30 UTC 2000


At 15:52 -0800 1/10/2000, Tim Rowledge wrote:
>.
>>  Where is performance tuning to be done?
>>  By the programmer at the source level?
>>  By the compiler?
>>  By the VM?
>All of the above. Although improvements in the VM can somehow seem to be most
>glamorous, I have observed many times that some careful work at the ST system
>code level can have very dramatic results. It is amazing how often 
>you can find
>places where work is being done two or even three times as often as is really
>required. As an example, I remember Eliot finding that the compiler was
>generating some parsetree component three times over; fixing that made all
>compiles much faster and improved the sytem benchmarks dramatically.

I agree with Tim.

I remember my first use of a profiler way back when at Boeing in 
19mumble. I ran it on my code and some friends' code, and found 
improvements everywhere.

The real blockbuster was one program that ran more than twice as fast 
when two calls to one builtin function were removed. The program 
simulated the use of an AWACS aircraft so was always comparing 
distances using:

    sqrt(a1**2 + a2**2)  >  sqrt(b1**2 + b2**2)

to see whether one aircraft was nearer than another. Obviously the 
following does the same thing since it's the relative magnitude that 
matters and not the exact distance:

    (a1**2 + a2**2)  >  (b1**2 + b2**2)

I almost never fail to find some glaring gotcha when I use a profiler.

Dave
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
_______________________________
Any opinions or recommendations
herein are those of the author
and not of his employer.





More information about the Squeak-dev mailing list