RE: [gtkmm] Is gtkmm bloated (6016 vs 30008 bytes)
- From: Murray Cumming Comneon com
- To: michael idisys iae nsk su, gtkmm-list gnome org
- Subject: RE: [gtkmm] Is gtkmm bloated (6016 vs 30008 bytes)
- Date: Sun, 23 Nov 2003 17:04:15 +0100
Michael N. Filippov wrote:
> But this is what I mentioned after compiling gtk and gtkmm:
> gtk-2.2.4 vs gtkmm-2.2.8 (gcc (GCC) 3.2.2 20030222 (Red Hat
> Linux 3.2.2-5) with default Makefiles, dymanically linked,
> after 'strip -s'). Sizes:
> samples/fixed: 6016 vs 30008 (1/5)
> demos/gtk-demo: 78012 vs 437536 (1/5 - 1/6)
> So it is not "stub" size (perhaps SigC::slot()s ?) and
> executable is 5-6 times bigger
>
> Please explain what am I doing wrong and is there a way to
> make it thinner ?
This doesn't interest me greatly, and I don't draw any conclusions, but
anybody is free to try to reduce any of these numbers if they feel if makes
a difference to them.
Here are some more numbers that might interest people:
1. Gtk/examples/helloworld/helloworld:
14K (5.1K after strip)
2. gtkmm2/examples/book/helloworld/.libs/helloworld:
676K (29K after strip)
3. gtkmm2/examples/book/helloworld/.libs/helloworld with a derived-but-empty
Gtk::Window class:
666K (25K after strip)
3.1 gtkmm2/examples/book/helloworld/.libs/helloworld with a
derived-but-empty Gtk::Object class:
228K (11K after strip)
3.2 gtkmm2/examples/book/helloworld/.libs/helloworld with a
derived-but-empty SigC::Object class:
125K (7.2K after strip)
4. gtkmm2/examples/book/helloworld/.libs/helloworld building just a main.cc
with a Gtk::Window instead of the derived Window:
412K (4.7K after strip)
(Comparing to 3., this suggest that 250K (20K stripped) is added just when
deriving the new class)
(Comparing 3 and 3.1, this suggests that deriving from Gtk::Window, compared
to deriving from Gtk::Object, adds 400K (14K stripped)).
5. gtkmm2/examples/book/helloworld/.libs/helloworld with just a main.cc with
just a Gtk::Main and a std::cout:
293K (5.3K after strip)
6. Like 5, plus #including gtkmm/window.h :
414K (5.3K after strip)
7. Like 5, plus #including glibmm/object.h :
187K (4.9K after strip)
8. Like 5, plus #including sigc++/object.h :
120K (4.9K after strip)
9. Simple non-gtkmm example with std::cout:
13K (3.9K after strip)
10. Simple non-gtkmm example with printf, as .cc:
11K (2.8K after strip)
11. Simple non-gtkmm example with printf, as .c:
11K (2.7K after strip)
Do remember that these numbers are code size, and probably have no
connection to the memory used for each instance of a class, and no
connection to any run-time speed. Optimisation can mean many things.
Murray Cumming
www.murrayc.com
murrayc usa net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]