🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Is the STL too authentic... ?

#112
From: Andrew Koenig
Date: Tue, 10 Oct 1995 12:22
29 lines
1901 bytes
In article <AC9FF58C96689D38@sleipner.nts.mh.se> lars.farm@nts.mh.se (Lars Farm) writes:

> >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.

Full run-time checking is exceedingly expensive in C and C++, mostly
because of C's unconstrained pointers.

> 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.

They do exist.  For example, one commercial product is acompiler/interpreter that
pretty much does full run-time checking that can be turned on and off
on a translation unit basis.  Another one is an after-compilation
range checker that rewrites the machine instructions in your executable
file to include run-time checking of many (though not all) bounds errors.
That product has the advantage of working with both C and C++; moreover
you don't even need the source code in order to use it.
-- 
				--Andrew Koenig
				  ark@research.att.com
Technical Details
Message-ID: <DG8Fpy.8u6@research.att.com>
Path: arc1-ca.pugleaf.net!in2.uu.net!allegra!alice!ark
References: <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!in2.uu.net!allegra!alice!ark
From: ark@research.att.com (Andrew Koenig)
Subject: Re: Is the STL too authentic... ?
Message-ID: <DG8Fpy.8u6@research.att.com>
Organization: AT&T Bell Laboratories, Murray Hill NJ
References: <DFxJ75.3w0@research.att.com> <KANZE.95Oct9140029@slsvgqt.lts.sel.alcatel.de> <AC9FF58C96689D38@sleipner.nts.mh.se>
Date: Tue, 10 Oct 1995 12:22:45 GMT