Re: Local optimization?

Chris F Clark <cfc@shell01.TheWorld.com>
10 Nov 2006 13:20:08 -0500

          From comp.compilers

Related articles
Local optimization? divilment@gmail.com (2006-11-10)
Re: Local optimization? cfc@shell01.TheWorld.com (Chris F Clark) (2006-11-10)
| List of all articles for this month |

From: Chris F Clark <cfc@shell01.TheWorld.com>
Newsgroups: comp.compilers
Date: 10 Nov 2006 13:20:08 -0500
Organization: The World Public Access UNIX, Brookline, MA
References: 06-11-037
Keywords: optimize
Posted-Date: 10 Nov 2006 13:20:08 EST

There will always be room for "local optimizations", see the
"Optimizer Writer's Full Employment Theorem", which states that for
any given set of optimizations there will always be at least one
program which can be optimized more. Local optimizations are a
convenient way of catching a few special cases for which you haven't
figured out how to write a whole global opimization framework for yet.


Global optimizations are ways to make your compiler look brilliant as
in "how did the compiler figure that out?" Local optimizations are
ways to keep your compiler from looking stupid as in "why didn't the
compiler just do this [obvious thing]?" If you don't mind your
compiler looking occsionally stupid, you may not need a local
optimizer. However, if you find your compiler looking stupid, adding
a local optimizer (and a pattern to cover the specific case found) is
often a simple, effective way of fixing that problem.


Hope this helps,
-Chris


*****************************************************************************
Chris Clark Internet : compres@world.std.com
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
23 Bailey Rd voice : (508) 435-5016
Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.