|
From: Ethan M. <merritt@u.washington.edu> - 2005-07-12 19:21:53
|
Here is an updated analysis of the affect of various configuration
options on the size of the gnuplot executable. All trials were
compiled using gcc 3.3.2 with CFLAGS "-g -O2" on a 32-bit Athlon.
"text" contains the code section itself
"data" contains initialized constants (e.g. string constants)
"bss" contains static declared storage (e.g. int foo[BIG])
"dec" is the total text+data+bss
# 11 Jul 2005
#----------------------------------------------------------------
text data bss dec filename
#----------------------------------------------------------------
912159 83428 34144 1029731 gnuplot_default
904447 83428 34048 1021923 gnuplot_nostrings -0.8%
893205 83188 34144 1010537 gnuplot_noimage -2%
817009 78380 30912 926301 gnuplot_nopm3d -10%
681291 60492 17920 759703 gnuplot_shortterm+gd -26%
666013 59620 14304 739937 gnuplot_shorttermlist -28%
605467 55304 17664 678435 gnuplot_dumb+gd+x11 -34%
The first 4 were all built with the default set of terminal drivers
(including pdf and gd). The last three were built with default
configuration options, but a reduced set of terminal drivers
"shortterm+gd" = dumb post estimate x11 gd
"shortterm" = dumb post estimate x11
"dumb+gd+x11" = dumb x11 gd
Bottom line conclusion:
If you want to reduce the size of the gnuplot executable, there is
very little to be gained by disabling configuration options. Disabling
pm3d (which automatically disables with-image and binary-polygon also)
reduces the size by only 10%.
On the other hand, the driver set is huge. In a default build, 40% of
the total size of the gnuplot executable is in term.o (not shown).
For fun, I re-compiled term.o many times with only a single driver
enabled each time. The resulting sizes (minus the base size of the
core code in term.c itself) are shown in the attached plots.
Notes:
This analysis reveals that omitting a small set of drivers, for
example (corel tgif tkcanvas tpic), has more effect on size than
configuring with --disable-pm3d --disable-with-image
The recent changes to pslatex.trm have made it impossible to omit
the pslatex driver from a gnuplot build without hacking the code
in several places. I'll rant on this in a separate Email.
This analysis does not show the effect of compilation options on
dynamically allocated storage, but this should be a very small
effect.
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|