Post about comparing C, C++ and D performance with a real world project
Jonathan M Davis
newsgroup.d at jmdavisprog.com
Thu Dec 7 12:00:00 UTC 2017
On Thursday, December 07, 2017 09:55:56 Antonio Corbi via Digitalmars-d
wrote:
> Hello all,
>
> Jussi Pakkanen (one of the meson build system creators) has
> written a post comparing C, C++ and D. Worth a read.
>
> http://nibblestew.blogspot.com.es/2017/12/comparing-c-c-and-d-performance-> with.html
Honestly, I find the results a bit depressing, but a lot of that probably
stems from the fact that it's not idiomatic D code, and any time you do more
or less direct conversions, you run the risk of things not working as
efficiently due to differences in the languages involved. The author does
acknowledge that, but without refactoring the code to be more idiomatic, it
makes D look bad - though the fact that it does better with memory than C or
C++ does make the GC look better than you'd necessarily expect. It's
certainly surprising that the GC is the _good_ part of the results.
I do wonder what the results would look like with clang and ldc though,
particularly since the version of gdc in Ubuntu is going to be pretty old.
It might make no difference at all, or there could be a definite
improvement, depending on what his code is doing and what has changed since
the last gdc release.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list