stdio performance in tango, stdlib, and perl
Walter Bright
newshound at digitalmars.com
Thu Mar 22 02:57:28 PDT 2007
James Dennett wrote:
> I'm at a loss to understand why you would write what you
> did. It seems to be a straw man, but maybe there was
> something else to it -- frustration that people assume
> that D must be slower than C++?
Maybe it is a bit of frustration on my part. I often run into people
who, when faced with benchmarks showing that conventional D runs code
faster than conventional C++, tell me in various ways that it can't be
true. I must have:
1) written bad C++ code
2) lied
3) used a sabotaged C++ compiler
4) written some magic optimization that only works on that carefully
crafted benchmark
So, I have some justification in saying what I did about the
conventional wisdom of C++. I also know that the top tier of experienced
C++ programmers are well aware such conventional wisdom is not true.
I have a lot of experience in making C++ code run fast. It doesn't come
easy, it takes a lot of work back and forth with a profiler. It usually
involves going around the C++ runtime library. That experience has
certainly strongly influenced the design of D. I don't wish to have to
write custom I/O just to get good I/O performance. I don't wish to keep
doing all the clever string hacks trying to make 0 terminated strings fast.
I want the natural, straightforward D code to be (at least close to) the
best performing way to implement an algorithm.
More information about the Digitalmars-d
mailing list