Perlin noise benchmark speed

JR via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 20 08:52:53 PDT 2014


On Friday, 20 June 2014 at 15:24:38 UTC, bearophile wrote:
> If I add this import in Noise2DContext.getGradients the 
> run-time decreases a lot (I am now just two times slower than 
> gcc with -Ofast):
>
> import core.stdc.math: floor;
>
> Bye,
> bearophile

Was just about to post that if I cheat and replace usage of 
floor(x) with cast(float)cast(int)x, ldc2 is almost down to gcc 
speeds (119.6ms average over 100 full executions vs gcc 102.7ms).

It stood out in the callgraph. Because profiling before 
optimizing.


More information about the Digitalmars-d mailing list