Integer micro-benchmarks [Smalltalk Multi-Precision Numerics vis-a-vis Highly Optimized Fixed Size Integer C++ Numerics]

John S. Yates, Jr john at everfile.com
Wed Apr 25 07:56:03 EDT 2001


On Tue, 24 Apr 2001 19:32:32 -0400 (EDT), Daniel Berlin <dan at www.cgsoftware.com> wrote:

>Errr, this is pretty basic PRE and loop hoisting.
>
>In other words, it's done by anyone taking a college compiler optimization
>course.
>--Dan

Two cents from an erstwhile professional compiler-writer.

Loop hoisting is indeed well known and widely practiced
(especially if all that is being hoisted is side-effect
free expression evaluation operations).

PRE (Partial Redundancy Elimination) is much less widely
known or implemented.  In fact I would be VERY suprised if
MS has implemented it since on average it has relatively
little payoff and tends to increase code size.

My guess is that most what you are seeing is synergistic
interaction between function inlining and symbolic evalu-
ation (a generalization of constant propagation).

But the most important thing that I believe Dan overlooked
is the core message from Fred Brook's "Mythical Man-Month"
namely the difference between a demonstration of working
code (enough to get an A in the course) and a QA-ed product.
In a mature compiler with an enormous customer-base one is
VERY careful about introducing new optimizations.  They MUST
be correct and robust.  The number of corner cases that have
to be verified can be enormous.

I personally am reasonably impressed by MS's optimizer.

/john
--
John Yates, CTO
EverFile
119 Braintree St
Allston, MA 02134
617 782-2833 x102




More information about the Python-list mailing list