dyu / ffi-overhead

comparing the c ffi (foreign function interface) overhead on various programming languages
Apache License 2.0
660 stars 40 forks source link

Add ldc (D) compiler #5

Closed rikkimax closed 6 years ago

rikkimax commented 6 years ago

While dmd does generate reasonable code, dmd's backend isn't exactly this century (even though it does very well).

For a better comparison against C++ with gcc, it would be best to use ldc (maybe even gdc?) as well.

dyu commented 6 years ago

Could you create a pull request with the ldc variant?

rikkimax commented 6 years ago

It'll need testing which I can't really do without a lot of work.

Two changes from what I can see:

And maybe add the flag -boundscheck=off.

dyu commented 6 years ago

Added the ldc2 variant and updated the results. The -release flag is already on. The -boundscheck=off didn't affect the results.

Thanks!