🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c++
Article #113

Re: Is the STL too authentic... ?

#113
From: James Kanze US/ESC 60/3/141 #407...
Date: Tue, 10 Oct 1995 19:48
56 lines
3403 bytes
In article <AC9FF58C96689D38@sleipner.nts.mh.se> lars.farm@nts.mh.se
(Lars Farm) writes:

|> In article <KANZE.95Oct9140029@slsvgqt.lts.sel.alcatel.de>,
|> kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) wrote:

|> >In article <AC9C151B9668D9B8@sleipner.nts.mh.se> lars.farm@nts.mh.se
|> >(Lars Farm) writes:
|> >
|> >|> In article <DG010o.LFK@research.att.com>,
|> >|> ark@research.att.com (Andrew Koenig) wrote:
|> >
|> >|> >Again, I think implementations that check the rules at run time are
|> >|> >a Good Thing, especialy if you can afford them.  But sometimes you can't.
|> >
|> >|> In those few cases, I'd turn checking of selectively after testing and
|> >|> profiling. That is, I would if I could. It's always off in all my
|> >|> compilers:-( Why not reserve a #pragma for this? imho no range check by
|> >|> default is a premature optimization.
|> >
|> >I'd rather agree with Andy Koenig: "run-time checking is a good thing
|> >if you can afford it."  This would suggest that the only time you turn
|> >checking off is when profiling shows that you have a performance
|> >problem due to run-time checking."

|> Interesting. I got the impression he felt they were a good thing, but would
|> impair performance too much to be required in the general case and I
|> responded accordingly.

That was my general impression, too.  I was agreeing with one specific
statement, and in fact, my interpretation (not necessarily his) to
that statement.

This said, I know that Andy sometimes likes to play the devil's
advocate.  Just when you think you have a water-tight argument, he
punctures it.  (He's particularly gifted at finding the exception that
breaks your generality.)  So I'm not really sure what he thinks.

|> Anyhow, I was unclear. Your reply is the second that indicates my failure
|> to communicate. Let me try again: I want runtime checks by default and some
|> mechanism to turn them off selectively. If I choose to turn checking off, I
|> would do so on a loop by loop basis and only after profiling and test. I
|> would also follow up by more profiling to see if it made a difference.

|> I consider the current status of every c++ compiler I have access to - no
|> range check at all - a premature, bad and unwanted optimization. I have
|> never seen a C++ compiler that does runtime checking. I'd love to use one,
|> even if the checking is only partial.

Do I ever agree with that.  I think you've hit it on the head.  No
bounds checking is an optimization.
-- 
James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                              -- Beratung in industrieller Datenverarbeitung
Technical Details
Message-ID: <KANZE.95Oct10204807@slsvgqt.lts.sel.alcatel.de>
Path: arc1-ca.pugleaf.net!xlink.net!slsv6bt!news
References: <5vE-N3F6nTB@site71.ping.at> <DFxJ75.3w0@research.att.com> <KANZE.95Oct9140029@slsvgqt.lts.sel.alcatel.de> <AC9FF58C96689D38@sleipner.nts.mh.se>

Show Full Headers
Complete Article Headers
Newsgroups: de.comp.lang.c++,comp.lang.c++
Path: arc1-ca.pugleaf.net!xlink.net!slsv6bt!news
From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
Subject: Re: Is the STL too authentic... ?
In-Reply-To: lars.farm@nts.mh.se's message of Tue, 10 Oct 1995 10:03:56 +0100
Message-ID: <KANZE.95Oct10204807@slsvgqt.lts.sel.alcatel.de>
Sender: news@lts.sel.alcatel.de
Organization: SEL
References: <5vE-N3F6nTB@site71.ping.at> <DFxJ75.3w0@research.att.com>
 <KANZE.95Oct9140029@slsvgqt.lts.sel.alcatel.de>
 <AC9FF58C96689D38@sleipner.nts.mh.se>
Date: 10 Oct 1995 19:48:07 GMT