Advantage with dinkum

A simple question (maybe) regarding Dinkum:
What is the advantage of using the Dinkum (Abridged?) C++ libraries compared
to the GNU C++ libs in QNX6.2?

regards, MB

Mats B <mats@singularity.se> wrote:

A simple question (maybe) regarding Dinkum:
What is the advantage of using the Dinkum (Abridged?) C++ libraries compared
to the GNU C++ libs in QNX6.2?

The trade-offs are size and conformance.

–cdm@bigbox–> size /lib/libstdc++.so
text data bss dec hex filename
257252 55068 2056 314376 4cc08 /lib/libstdc++.so
–cdm@bigbox–> size /lib/libcpp.so
text data bss dec hex filename
398633 105972 2836 507441 7be31 /lib/libcpp.so
–cdm@bigbox–> size /lib/libecpp.so
text data bss dec hex filename
84958 24052 1072 110082 1ae02 /lib/libecpp.so


The full Dinkum (libcpp) is the biggest and the one that conforms to the
C++ standard. The GNU (libstdc++) is smaller but doesn’t conform to the
standard. The abridged (ecpp) is the smallest and has a documented subset
of the standard.

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

On 16 Oct 2003 16:55:21 GMT, Chris McKillop wrote:

Mats B <> mats@singularity.se> > wrote:
A simple question (maybe) regarding Dinkum:
What is the advantage of using the Dinkum (Abridged?) C++ libraries compared
to the GNU C++ libs in QNX6.2?


The trade-offs are size and conformance.

And speed. And licensing “safety”. And bugs.

In our experience the GNU libs compile about twice as fast as Dinkum and
run about 20-30% faster for similar levels of optimisation.

On the other hand, the Dinkum libs are guaranteed “safe” to use in a
commercial product. The GNU libs are subject to the LGPL which may or may
not hinder your ability to use them in a commercial product. The
predominant view seems to be that the GNU libs are OK as long as you
dynamically link to them, but there are dissenting views and this has never
been tested in court.

Finally, we have found a couple of instances where there are bugs (as
distinct from non-conformance) in the current version of the GNU libs that
lead to mysterious application crashes - which don’t occur with Dinkum.

What we do: Make all our code so that it builds with both Dinkum and GNU.
This requires a few #defines in the odd place, mainly to do with iostreams.
We use GNU on the developer’s desktop for productivity (a re-build of
“everything” takes 20 minutes instead of 45+). We use Dinkum for all
integration, production and release builds.

Hope this is of some use,

Rob Rutherford

Robert Rutherford wrote:

On the other hand, the Dinkum libs are guaranteed “safe” to use in a
commercial product.

I guess an Aussie would say they’re Dinkum :wink: