The Computer Language Benchmarks Game
qznc via Digitalmars-d
digitalmars-d at puremagic.com
Sun Aug 7 14:19:54 PDT 2016
On Sunday, 7 August 2016 at 17:53:12 UTC, Isaac Gouy wrote:
> On Sunday, 7 August 2016 at 05:04:29 UTC, Walter Bright wrote:
>
>>> Ultimately, my opinion is that the benchmark is outdated and
>>> not useful today. I
>>> ignore it, if anybody cites the benchmark game for
>>> performance measurements.
>>
>> Yeah, I wouldn't bother with it, either.
>
>
>
> Rather than only being dismissive, wouldn't it be more
> effective to say what you would bother with.
>
> https://github.com/kostya/crystal-benchmarks-game
>
> https://github.com/def-/nim-benchmarksgame
>
> Where are the D comparison programs that people should bother
> with?
Comparing so many languages is too broad. We need more specific
benchmarks which must be looked at in more detail.
For example, it makes sense to have a benchmark for regular
expressions. It is interesting to compare Rust and D, because
they both use compile-time tricks, which C cannot do. It makes no
sense to compare them to an equivalent Python/Ruby/etc program,
because they all use the same C library internally. More details:
Regular expressions are used in very different scenarios, so one
program might not be enough. Simple expression or complex
expression? Find first or find all? ASCII or Unicode? Large
haystack or small?
If you want to answer the big question of "how fast is D compared
to C", the best answer is "roughly the same if you compare clang
to LDC, because they use the same optimizer and code generator".
Getting some numbers from a bunch of benchmark programs does not
improve the answer. You can only get a better answer in the sense
that it becomes more specific to your specific use case, but that
requires you to build your own benchmark.
More information about the Digitalmars-d
mailing list