|
From: Ethan M. <merritt@u.washington.edu> - 2005-03-01 21:49:01
|
(I'm cc'ing people directly because I'm not sure the attachment will
make it onto the list)
> Or even (3): remove all #ifdef PM3D. Now, this functionality is an inherent
> part of gnuplot, so it does not make sense any longer to separate its source
> code pieces visually by #ifdef PM3D ... #endif.
>
> Same for USE_ULIG_FILLEDBOXES, USE_ULIG_RELATIVE_BOXWIDTH, and maybe
> something more?
I have wanted to remove USE_ULIG_RELATIVE_BOXWIDTH since before
the 4.0 release. It protects a grand total of about 20 lines of code,
and half of those are just an additional test inside an existing if() statement.
There is no run-time penalty in memory use.
The code supporting USE_ULIG_FILLEDBOXES is slightly bigger, but not much.
Again there is no run-time penalty in memory use that I can see.
So yes, I would favor removing the #ifdef and configuration options
for both of these.
Here are some size comparisons for different configuration options:
text data bss dec hex filename
#-----------------------------------------------------------------------
946764 83476 34016 1064256 103d40 gnuplot_default
930054 83216 33888 1047158 ffa76 gnuplot_no_strings_histograms
941086 81168 33984 1056238 101dee gnuplot_no_aed_regis_tek
934260 83196 34016 1051472 100b50 gnuplot_nofilledboxes
929010 83204 34016 1046230 ff6d6 gnuplot_noimage
848734 78364 30816 957914 e9dda gnuplot_noimage_nopm3d
688172 59708 14208 762088 ba0e8 gnuplot_termshortlist
614196 54616 13920 682732 a6aec gnuplot_onedriveronly
599186 55632 13504 668322 a32a2 gnuplot_nopm3d_termshortlist
These are respectively
- default configuration of current cvs (includes gd and pdf terminals)
- ./configure --disable-histograms --disable-stringvariables --disable-datastrings
- comment out some really old terminal drivers
- ./configure --disable-filledboxes
- ./configure --disable-with-image
- ./configure --disable-pm3d
- build only shortlist terminals (dumb epslatex/pslatex/post/pstex table x11)
- one terminal driver only (x11 dumb table)
- shortlist terminals and no pm3d no image
And a plot attached (which of course could not have been produced
if all these great options were disabled :-)
*** NOTE LOG SCALE ON Y ***
As you can see, the code and data sizes are far more sensitive to
choice of terminal drivers than to the code configuration options.
Building without pm3d+image gains you 10% in size
Building without most of the other post-4.0 features gains about 2%
Building with a short list of terminals gains you 28% in size
In the extreme case of an embedded environment with a fixed display,
the further reduction to a single terminal driver (I used x11
for convenience to test the size) gains you 36%
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|