http://d.puremagic.com/issues/show_bug.cgi?id=4447
Heywood Floyd soul...@gmail.com changed:
What|Removed |Added
CC||soul...@gmail.com
--- Comment #1 from Heywood Floyd soul...@gmail.com 2010-07-12 08:58:39 PDT
---
// - - 8 - -
version(one)
{
fooManual(a, b);
fooCompiler(a, b);
fooManual(a, b);
fooCompiler(a, b);
fooManual(a, b);
fooCompiler(a, b);
}
version(two)
{
fooCompiler(a, b);
fooManual(a, b);
fooCompiler(a, b);
fooManual(a, b);
fooCompiler(a, b);
fooManual(a, b);
}
// - - 8 - -
$ dmd -inline -O -release -version=one -run odd
manual: d = 32.00, B578time: 126120
compiler: d = 32.00, B578time: 8200
manual: d = 32.00, B578time: 5920
compiler: d = 32.00, B578time: 5960
manual: d = 32.00, B578time: 5690
compiler: d = 32.00, B578time: 5620
$ dmd -inline -O -release -version=two -run odd
compiler: d = 32.00, B578time: 130200
manual: d = 32.00, B578time: 8140
compiler: d = 32.00, B578time: 5800
manual: d = 32.00, B578time: 5730
compiler: d = 32.00, B578time: 5590
manual: d = 32.00, B578time: 5600
$ _
I can't see that the order of the functions have any impact, rather, the first
couple of 100-thousand CPU ticks the program is not at 100% of its potential
performance. This could be anything, maybe the OS must set some things up for
the first write to stdout, or, the D runtime must do some things, like
expanding the heap for the first allocation etc? I've no idea. Just guessing.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---