Related articles |
---|
Is global optimization worth it? lance.delahaye@xtra.co.nz (2001-12-15) |
Re: Is global optimization worth it? nmm1@cus.cam.ac.uk (2001-12-20) |
Re: Is global optimization worth it? rsherry8@home.com (Robert Sherry) (2001-12-20) |
Re: Is global optimization worth it? mwso@earthlink.net (Gary Oblock) (2001-12-20) |
Re: Is global optimization worth it? lex@cc.gatech.edu (Lex Spoon) (2001-12-20) |
Re: Is global optimization worth it? lance.delahaye@xtra.co.nz (2002-01-24) |
Re: Is global optimization worth it? lance.delahaye@xtra.co.nz (2002-01-24) |
Re: Is global optimization worth it? nmm1@cus.cam.ac.uk (2002-01-24) |
Re: Is global optimization worth it? rinie@xs4all.nl (Rinie Kervel) (2002-01-28) |
[2 later articles] |
From: | "Robert Sherry" <rsherry8@home.com> |
Newsgroups: | comp.compilers |
Date: | 20 Dec 2001 00:31:45 -0500 |
Organization: | Excite@Home - The Leader in Broadband http://home.com/faster |
References: | 01-12-069 |
Keywords: | optimize |
Posted-Date: | 20 Dec 2001 00:31:45 EST |
My belief is that global optimization will save you only about 20% in
terms of time. However, it certain cases it could be 200%. For example,
consider the following code fragment:
for i = 0 to 99
a[i] = 0;
Turning the above code fragment into a single block move could be a big win
here. My advice to you is try to avoid writing a global optimizer but leave
room for it in your design so that if you need to you can go back an add it
latter. In general, I would leave the hooks in to for a variety of different
optimizations but do none of them until my compiler was working.
By the way, I have fond that the iterative methods are significantly
easier to implement then something like T1-T2 analysis.
Robert Sherry
"Lance" <lance.delahaye@xtra.co.nz> wrote in message
> I'm starting a compiler project. I am wondering if it is worth
> ignoring global optimisations for a pascal-type scoped language. About
> how much optimisation gain is there to be had there? If its more than
> about a third, I probably shouldn't ignore it, but it would simplify
> my life quite a bit if I could.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.