Perlin noise benchmark speed
David Nadlinger via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 20 07:40:46 PDT 2014
On Friday, 20 June 2014 at 13:46:26 UTC, Mattcoder wrote:
> On Friday, 20 June 2014 at 13:14:04 UTC, dennis luehring wrote:
>> write, printf etc. performance is benchmarked also - so not
>> clear
>> if pnoise is super-fast but write is super-slow etc...
>
> Indeed and using Windows (At least 8), the size of
> command-window (CMD) interferes in the result drastically...
> for example: running this test with console maximized will
> take: 2.58s while the same test but in small window: 2.11s!
Before I wrote the above, I briefly ran the benchmark on my local
(OS X) machine, and verified that the bulk of the time is indeed
spent in the noise calculation loop (with stdout piped into
/dev/null). Still, the LDC-compiled code is only about half as
fast as the Clang-compiled version, and there is no good reason
why it should be.
My new guess is a difference in inlining heuristics (note also
that the Rust version uses inlining hints). The big difference
between GCC and Clang might be a hint that the performance drop
is caused by a rather minute difference in optimizer tuning.
Thus, we really need somebody to sit down with a
profiler/disassembler and figure out what is going on.
David
More information about the Digitalmars-d
mailing list