Language Shootout
David B. Held
dheld at codelogicconsulting.com
Tue Mar 27 02:25:46 PDT 2007
janderson wrote:
> [...]
> That would be a C verse C comparison. I don't think that would be of
> much advantage. I think the C++ version should be OO too (not that we
> can change that).
>
> D really needs to be done in a way that looks like D. Hopefully, the
> extra overhead can be optimized in other ways.
The FAQ clearly states that you should write the program in the fastest
manner possible. I think we can agree that inline asm is not
appropriate for C/C++/D, but I think it's perfectly fair to forego the
OOP aspects of the langauge where it is possible to do so and realize a
speed benefit. After all, that is much of the point of D, isn't it?
You can't exactly shoehorn stack objects into Java, and that is much of
what makes the Language Shootout relevant.
So what if it turns out to be C vs. C? That would be great advertising
for D, IMO. The fact that D is in the top 5 on both platforms for this
test is great. The fact that C++ is actually faster than C in some
cases is very interesting and worth of consideration. The assumption
that C is automatically the fastest language does not always hold. The
fact that Eiffel is near the top is interesting, as well as Scala. The
fact that Haskell is 5-6x slower than C is also very interesting.
If you want a test that exercises the OOP aspects of languages, perhaps
we could create a reasonable one and suggest it to the Shootout.
Dave
More information about the Digitalmars-d
mailing list