A Friendly Challenge for D

welkam wwwelkam at gmail.com
Fri Oct 12 15:11:17 UTC 2018


On Wednesday, 10 October 2018 at 16:15:56 UTC, Jabari Zakiya 
wrote:
> What I am requesting here is for a person(s) who is an "expert" 
> (very good) to create a very fast D version, using whatever 
> tricks it has to maximize performance.
>
> I would like to include in my paper a good comparison of 
> various implementations in different compiled languages (C/C++, 
> D, Nim, etc) to show how it performs with each.

I looked into your NIM code and from programmers point of view 
there is nothing interesting going on. Simple data structures and 
simple operations. If you wrote equivalent code in C, C++, D, 
NIM, Rust, Zig and compiled with same optimizing compiler (llvm 
or gcc) you should get the same machine code and almost the same 
performance (less than 1% difference due to runtime). If you got 
different machine code for equivalent implementation then you 
should file a bug report.

The only way you will get different performance is by changing 
implementation details but then you would compare apples to 
oranges.




More information about the Digitalmars-d mailing list