From: Felix Domke <tmbinc@elitedvb.net>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Re: C++ Library recommendations ...
Date: Tue, 28 Jan 2003 11:38:29 +0100 [thread overview]
Message-ID: <3E365DA5.7060201@elitedvb.net> (raw)
In-Reply-To: 200301280810.JAA19807@hzsms01.nl.lucent.com
Jaap-Jan Boor wrote:
> I just use libstd++ coming with gnu g++, it's not too big (shared ~300k)
> compared to glibc (shared ~1.2 M)
problem is that the STL is a template library, so a lot of code is
produced when using these tamplates.
i highly recommend to use normal lists and cast pointers (like in good
old C times) again, even with the need of allocating two chunks per list
item (pointer and data itself).
Using STL makes your application MUCH bigger, and, often slower.
STL is optimized for huge data structures, but for most things
memcpy'ing (and using for example an array/vector) is much faster than
using a list or hash, which has optimal - for example linear or even log
- complexity. The thing the STL guy forgot is to keep in mind than
1000*linear (list insertions... ) is still worse than 1*exp (memcpy when
doing vector insertions... but take this only as an example) when your
list has, for example, 5 entries.
and most of the lists are NOT accessed ten thousand times, do NOT have
one million entries where 1000*linear is a LOT more than 1*exp complexity.
just my 2 cent...
felix
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2003-01-28 10:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-28 8:10 C++ Library recommendations Jaap-Jan Boor
2003-01-28 10:38 ` Felix Domke [this message]
2003-01-28 15:27 ` Roland Dreier
-- strict thread matches above, loose matches on Subject: below --
2003-01-28 1:38 bdi2000 Rod Boyce
2003-01-28 3:10 ` C++ Library recommendations jgdon
2003-01-28 3:13 ` Jim Don
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E365DA5.7060201@elitedvb.net \
--to=tmbinc@elitedvb.net \
--cc=linuxppc-embedded@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).