Perlin noise benchmark speed

Ary Borenszweig via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 20 07:58:37 PDT 2014


On 6/20/14, 9:32 AM, Nick Treleaven wrote:
> Hi,
> A Perlin noise benchmark was quoted in this reddit thread:
>
> http://www.reddit.com/r/rust/comments/289enx/c0de517e_where_is_my_c_replacement/cibn6sr
>
>
> It apparently shows the 3 main D compilers producing slower code than
> Go, Rust, gcc, clang, Nimrod:
>
> https://github.com/nsf/pnoise#readme
>
> I initially wondered about std.random, but got this response:
>
> "Yeah, but std.random is not used in that benchmark, it just initializes
> 256 random vectors and permutates 256 sequential integers. What spins in
> a loop is just plain FP math and array read/writes. I'm sure it can be
> done faster, maybe D compilers are bad at automatic inlining or
> something. "
>
> Obviously this is only one person's benchmark, but I wondered if people
> would like to check their code and suggest reasons for the speed deficit.

I just tried it with ldc and it's faster (faster than Go, slower than 
Ni. But this is still slower than other languages. And other languages 
keep the array bounds check on...


More information about the Digitalmars-d mailing list