D speed compared to C++

lutger lutger.blijdestijn at gmail.com
Wed Mar 26 06:24:34 PDT 2008


Georg Wrede wrote:
...
> Now, if you have your code so that, say, a loop you're executing,
> contains subroutine or function calls that actually reside far apart in
> memory, then it might be that the processor doesn't understand to keep
> all of them in the cache. One way to ease this is to see to it that the
> needed functions reside close to each other in ram. One way of trying to
> dot this is to have them next to each other in the source code. ...

Another way is to use the profiler built into dmd. It can generate a def
file with the optimal link order gathered from empirical results:

http://www.digitalmars.com/ctg/trace.html 

It's only for win32 however.



More information about the Digitalmars-d mailing list