Re: [gtk-list] Re: Gtk--: G_List quirks
- From: Guillaume Laurent <glaurent worldnet fr>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Gtk--: G_List quirks
- Date: 03 Aug 1998 19:17:42 +0200
Kevin Handy <kth@srv.net> writes:
> Actually, I believe that most of the STL is written as inline
> functions. It is dependent on the compiler you use if these
> become actual functions, but the STL code seems fairly compact
> anyway.
Not "most", but a large part indeed. Which has nothing to do with
resulting binary size anyway (we tried massive inlining in Gtk-- at
some point, and went back because the lib size had almost doubled).
> One thing that the STL does give you, as opposed to the (void *)
> pointers, is it doesn't have to store the pointer to the data,
> wich saves you 4 bytes (or more) of storage for each node.
I don't see what you mean. You still have to store something in a
node, and if it's not a pointer to an object, it's the object itself
(or a copy), which in 99% of the time is much less efficient.
What the STL gives you is efficient, type-safe, re-useable data
containers, means to explore them, and algorithms to operate on
them.
--
Guillaume.
http://www.worldnet.fr/~glaurent
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]