Thread overview
D's performance.
Jun 30, 2020
Jowei Dei
Jun 30, 2020
Dukc
Jun 30, 2020
Jowei Dei
Jun 30, 2020
bachmeier
Jun 30, 2020
Jowei Dei
Jun 30, 2020
Guillaume Piolat
Jun 30, 2020
Walter Bright
June 30, 2020
I am curious about the performance of D language as a production tool, compared with C and C + + these lower level languages will be slower? Can you provide some parameters for comparison? thank you.
June 30, 2020
On Tuesday, 30 June 2020 at 14:26:02 UTC, Jowei Dei wrote:
> I am curious about the performance of D language as a production tool, compared with C and C + + these lower level languages will be slower? Can you provide some parameters for comparison? thank you.

This article is biased towards D, but still illustrates why we tend to favor it: https://seb.wilzba.ch/b/2018/02/the-expressive-c17-coding-challenge-in-d/
June 30, 2020
On Tuesday, 30 June 2020 at 14:33:46 UTC, Dukc wrote:
> On Tuesday, 30 June 2020 at 14:26:02 UTC, Jowei Dei wrote:
>> I am curious about the performance of D language as a production tool, compared with C and C + + these lower level languages will be slower? Can you provide some parameters for comparison? thank you.
>
> This article is biased towards D, but still illustrates why we tend to favor it: https://seb.wilzba.ch/b/2018/02/the-expressive-c17-coding-challenge-in-d/

Thank you for your information. It seems that the performance of D is not very bad compared with low-level languages. It may be between C and Java or. Net. As a normal production tool, there should be no problem. Thank you for your reply. Best regards
June 30, 2020
On Tuesday, 30 June 2020 at 14:46:32 UTC, Jowei Dei wrote:
> On Tuesday, 30 June 2020 at 14:33:46 UTC, Dukc wrote:
>> On Tuesday, 30 June 2020 at 14:26:02 UTC, Jowei Dei wrote:
>>> I am curious about the performance of D language as a production tool, compared with C and C + + these lower level languages will be slower? Can you provide some parameters for comparison? thank you.
>>
>> This article is biased towards D, but still illustrates why we tend to favor it: https://seb.wilzba.ch/b/2018/02/the-expressive-c17-coding-challenge-in-d/
>
> Thank you for your information. It seems that the performance of D is not very bad compared with low-level languages. It may be between C and Java or. Net. As a normal production tool, there should be no problem. Thank you for your reply. Best regards

Not sure what you mean by drawing a distinction between D and low-level languages. If you translate a piece of C code into D (it doesn't even require much translation since the syntax is similar) and compile it, you'll get the performance of C. If D code is slower than C, it's because you've chosen to write slower code for convenience/safety reasons rather than performance.
June 30, 2020
> Not sure what you mean by drawing a distinction between D and low-level languages. If you translate a piece of C code into D (it doesn't even require much translation since the syntax is similar) and compile it, you'll get the performance of C. If D code is slower than C, it's because you've chosen to write slower code for convenience/safety reasons rather than performance.

I want to use d to develop my own DSL, which requires the performance guarantee of the original language to avoid the performance loss of the upper DSL. In addition, I don't want to implement an extremely complex garbage collector by myself, so I want to find a language with automatic collection function. After comprehensive consideration, I still think that D is very suitable in this respect. It is not cumbersome, fast, and the basic library is relatively complete.
June 30, 2020
On Tuesday, 30 June 2020 at 15:13:15 UTC, Jowei Dei wrote:
>
> I want to use d to develop my own DSL, which requires the performance guarantee of the original language to avoid the performance loss of the upper DSL. In addition, I don't want to implement an extremely complex garbage collector by myself, so I want to find a language with automatic collection function. After comprehensive consideration, I still think that D is very suitable in this respect. It is not cumbersome, fast, and the basic library is relatively complete.

In optimized settings, D doesn't have bounds checks or integer overflow checks, it can easily be the very same performance as C and C++.

You can use AMD CodeXL / Intel Amplifier and all kinds of profilers like you would in C++.

June 30, 2020
On 6/30/2020 7:26 AM, Jowei Dei wrote:
> I am curious about the performance of D language as a production tool, compared with C and C + + these lower level languages will be slower? Can you provide some parameters for comparison? thank you.

If you write the same code in the same way, you'll get identical performance between C, C++, and D. Note that they use the same optimizers and back ends.