|
From: Petr M. <mi...@ph...> - 2004-12-07 08:57:31
|
> > (*) Quadrangles may take a lot of memory. I propose to change double to
> > float (should probably happen also for gpdPoint structure).
> >
> > typedef struct {
> > double gray;
> > double z; /* maximal z value after rotation to graph coordinate system
> > */
> > gpdPoint corners[4];
> > gpiPoint icorners[4]; /* also if EXTENDED_COLOR_SPECS is not defined */
> > } quadrangle;
>
> Please, if you do that, respect prior art and use the existing type
> 'coordval' for that. That's what this type was designed for: it's
> defined as double on platforms that can afford it, and float elsewhere.
IMHO, gnuplot is using too much memory for images and surfaces -- or, in
other words, it can work with large images, like >=512^2 pts, but it
suffers. I would prefer not to use double if float is sufficient, as in this
case.
The above structure is 64 B for double, and 40 B for float.
For an image of 512^2 it would save 6 MB.
Well, we can always recompile gnuplot for using float instead of double. I
do sometimes.
---
PM
|