D perfomance
serge
abc at abc.com
Fri Apr 24 13:44:18 UTC 2020
On Wednesday, 22 April 2020 at 16:23:58 UTC, Guillaume Piolat
wrote:
> On Wednesday, 22 April 2020 at 14:00:10 UTC, serge wrote:
>> My understanding that D is the language in similar ballpark
>> performance league as C, C++, Rust.
>
> Yes.
>
> If you have time to optimize: there is preciously little
> difference speed-wise between native languages.
>
> Every native language using the same backend end up in the same
> ballbark, with tricks to get the code to the same baseline.
>
> The last percents wille be due to different handling of UB,
> integer overflow, aliasing... but in general the ethos of
> native language is to allow you to reach top native speed and
> in the end they will generate the exact same code.
>
>
> But, if your application is barely optimized, or more likely
> you don't have time to optimize properly, it becomes a bit more
> interesting. Defaults will matter a lot more and things like
> GC, whether the langage encourages copies, and the "idiomatic"
> style that is accepted will start to bear consequences (and
> even more so: libraries). This is what end up in benchmarks,
> but if the application was worth optimizing for it (in terms of
> added value) it would be optimized hard to get to that native
> ceiling.
>
> In short, the less useful an application is, the more it will
> display large differences between languages with similar
> low-level capabilities.
>
>
> It would be much more interesting to compare _backends_, but
> people keep comparing front-ends because it drives traffic and
> commentary.
Could you please elaborate on that? what are you referring to as
backend? I am not interested to compare one small single
operation - fib test already did that.
To me techempower stats is pretty good indicator - it shows json
processing, single/multiquery requests, database, static. Overall
performance across those stats give pretty good idea, how
language and web framework is created, its ecosystem.
For example if language is fast on basic operations but two
frameworks show less then adequate performance then obviously
something wrong with the whole ecosystem - it could be difficult
to create fast and efficient apps for average developer. For
example Scala - powerfull but yet very complicated language with
tons of problems. Most of Scala projects failed. It is very
difficult and slow to create efficient applications for
average developer. It kinds requires rocket scientist to write
good code in Scala. Does D exhibit same problem?
More information about the Digitalmars-d
mailing list