Benchmarking sigmoid function between C and D

Daniel N no at public.email
Sat Apr 7 19:14:14 UTC 2018


On Saturday, 7 April 2018 at 18:53:57 UTC, Arun Chandrasekaran 
wrote:
> What am I doing wrong here that makes the D equivalent 2.5 
> times slower than it's C equivalent?
>
> Compilers used:
>
> LDC2: LDC - the LLVM D compiler (1.8.0)
> GCC: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
>
> 11:36:39 ~/code/c/test2$ ldc2 sigmoid.d -O5 && ./sigmoid

When benchmarking against C you need to add more switches to 
ldc2, like:
-release -boundscheck=off



More information about the Digitalmars-d-learn mailing list