Re: VC++2005 executables much slower than VC++6????
"Nemanja Trifunovic" wrote:
Doing another couple of checks is negligible
"waste" of resources for modern computer. However, the
ROI
of these checks is high.
FIrst of all we need to distinguish between libraries and
applications.
For many real life applications, Carl's reasoning makes a
lot of sense,
and btw that's the reason many application developers are
moving to
"safer" programming languages these days.
I totally agree with that. That's why I made clear
distinction between the language itself (which didn't change
in that respect) and accompanying library (which is more
flexible in accommodating to changing reality).
Libraries in general, and the Standard Library in
particular are quite
a different color, though. They need to be both fast and
correct.
*Another couple of checks* that result in operations being
slower by a
magnitude is not acceptable - at least not in Release
mode.
The fact that the most widely used Standard Library
implementation decided to enable checked iterators by
default speaks for itself. It appears that for overwhelming
majority of customers these checks are either desirable or
satisfactory enough to keep them enabled. Such decisions
aren't made out of mischievous spirit but reflect industry's
demand. You compare current iterator performance to old one
as if it's some kind of standard. However, it is not. Such
argument is akin to oppositon to C++ expressed by some C die
hards because virtual function call "holds back performance"
and implicit constructors calls put "coder out of control",
etc.. The same kind arguments was made by ASM die hards to C
supporters.
In the same manner as most coders willingly pay cost of
virtual calls in order to get richer language, they
willingly sacrifice a couple of CPU cycles to obtain more
stable secure code. Even though iterators' speed was
degraded in order of magnitude, the time that average
application spends within iterator's code is nothing
comparing to other parts. That's why overall performance is
hardly stricken while overall robustness of a code improved
greatly.