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 11 of 11 Topic 2331 of 2534
Post > Topic >>

Re: Reordering of functions

by George Neuner <gneuner2@[EMAIL PROTECTED] > Feb 25, 2008 at 05:15 PM

On Mon, 18 Feb 2008 17:22:52 +0100, Tim Frink <plfriko@[EMAIL PROTECTED]
>
wrote:

>I've a question about the influence of compiler optimizations that
>reorder functions on the system performance.

>Assume a modern processor with all state-of-the art features like
>prefetching, branch prediction and a superscalar pipeline. Further
>assume that all caches are disabled. Will the program runtime change
>when just the order of functions is changed (without any other code
>transformation)?

>I'm of the opinion that a reordering of function should have little
>influence on the program execution, maybe due to some prefetch effects
>but thes should be marginal.  Of course, with caches this situation
>would look different.

It strikes me that your hypothetical processor is a pretty good match
to a modern DSP.  Most DSP designs have neither branch prediction nor
traditional code/data cache because they have clocked matched internal
SRAM and if any external RAM is present, it is typically the same.

Some things DSPs typically do have that many traditional CPUs do not
are recognizable loop start/end instructions, a small prefetch code
cache dedicated to (suitably sized) loop bodies, near/far call
instructions, banked memory and multiple buses to fetch code and
(typically) multiple data from separate memory banks simultaneously.

It is very common in DSP development to deliberately place code and
data to take maximum advantage of simultaneous fetch, and to pack
related functions for faster near calling.  On VLIW designs, overall
code size may change due to different instruction packing.

I've done a fair bit of DSP programming, and apart from the
aforementioned memory bank and near/far call issues, I can't really
say that I've seen any noticeable impact on speed just from reordering
of functions.

George
 




 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 Wed Oct 15 22:29:18 CDT 2008.