debug extension overhead

Benjamin Kosnik bkoz@redhat.com
Wed May 20 18:36:00 GMT 2009


> Have you considered adding a knob that would turn on a subset of
> _GLIBCXX_DEBUG checks that have lower overhead, e.g., guaranteed
> constant factor?  Some users are giving up on it due to high overhead
> in certain cases, but they could benefit from cheap checks, such as
> vector subscript checks.  

Hmm. The idea was that for fine-grained checks, one would just select
the debug extension on a per-header basis, instead of using
_GLIBCXX_DEBUG. Ie, including debug/vector and
using __gnu_debug::vector if all you want is vector subscript checks.

Can you provide more detail for the scenario you mention above, users
giving up on it due to high overhead? Examples with specifics
(code, gcc release, target) please.

> Also, it would increase its usability in time sensitive applications.

Usability in time sensitive applications is not and has never been a
design goal for debug extensions.

-benjamin



More information about the Libstdc++ mailing list