Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: Reordering ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 11 Topic 2331 of 2461
Post > Topic >>

Re: Reordering of functions

by Tim Frink <plfriko@[EMAIL PROTECTED] > Feb 21, 2008 at 09:36 AM

> Maybe.  You've set up a straw-man where you have tried to deny all
> ways that changing the order of function calls might affect
> preformance and then asked will performance remain unchanged.
> However, even in your denial you have left holes open, what about
> machines the execute a limited number of instructions out-of-order and
> use register renaming.  That's a cache-like effect (just like
> pre-fetching, and branch prediction are).  Reordering the function
> calls can influence all of those.

I agree with you on that. That's obvious. But I was actually talking
about the rearrangement of functions in memory while the order of
function invocations remains the same.

> Finally, some of the effects are hard to quantify and/or predict. When I
> was working on the Alpha optimizer, there were some optimizations we
> specifically turned on (and off) in specific orders because they had an
> unfortunate interaction on one of the benchmarks we were measuring
> against.  The right combination of optimizations yielded a fortuitous
> alignment of a critical loop, that was lost if we did (a little) more
> optimization until we got significantly more optimizations enabled and
> could remove enough code that the loop was always aligned.

Finding the right combination of optimizations which yields good
results for a set of different programs seems to be an unsolvable
problem. How do compiler designers decide which combinations/sequences
of optimizations seem to be promising and are put together into an
optimization level (like gcc's -O)?

Is this an trial-and-error approach assisted with some experience?

One "solution" I know is the ACOVEA project which uses an genetic
algorithm to find the "best" gcc options for a particular program
under test. But this is a particular case where you want to achieve
best results for one application.

Regards,
Tim
 




 11 Posts in Topic:
Reordering of functions
Tim Frink <plfriko@[EM  2008-02-18 17:22:52 
Re: Reordering of functions
"Nikolai Kim" &  2008-02-18 22:33:31 
Re: Reordering of functions
Tim Frink <plfriko@[EM  2008-02-21 09:53:21 
Re: Reordering of functions
=?ISO-8859-15?Q?Jan_Vorbr  2008-02-25 11:39:05 
Re: Reordering of functions
Joel Yliluoma <bisqwit  2008-02-19 11:33:56 
Re: Reordering of functions
Tim Frink <plfriko@[EM  2008-02-21 09:41:38 
Re: Reordering of functions
glen herrmannsfeldt <g  2008-02-24 01:59:56 
Re: Reordering of functions
Chris F Clark <cfc@[EM  2008-02-19 09:55:43 
Re: Reordering of functions
Tim Frink <plfriko@[EM  2008-02-21 09:36:08 
Re: Reordering of functions
Chris F Clark <cfc@[EM  2008-02-24 17:57:01 
Re: Reordering of functions
George Neuner <gneuner  2008-02-25 17:15:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 19:11:11 CDT 2008.