[postgis-devel] Updates to GEOS & POSTGIS
Ben Jubb
benjubb at refractions.net
Mon Jan 21 09:03:35 PST 2008
Tom Lane wrote:
> * memcmp is cheap as long as it hits a diff before proceeding real far.
> You might want to organize the field order with malice aforethought
> so that likely-to-be-different fields appear earlier.
>
Not possible, i don't have any control over the organization of the
geometry object.
> * Be sure there are no uninitialized bits hiding anywhere in the struct,
> like in padding bytes between fields. If you make a practice of zeroing
> the struct (eg with palloc0) before you fill the fields, this should be
> okay.
>
Not an issue.
> * If you are dealing with float data then there's a small problem: zero
> and minus zero are equal according to the IEEE spec, but not according
> to memcmp. I think you can probably ignore this for the case of
> deciding whether a cache entry is still valid, since a phony "not equal"
> indication is at worst a performance hit not a correctness problem.
> But it's something to keep at the back of your head.
>
If this is a problem, i don't think theres anything that can be done
about it.
Looks like I'm stuck with memcmp(). rats.
b
-------------- next part --------------
A non-text attachment was scrubbed...
Name: benjubb.vcf
Type: text/x-vcard
Size: 255 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20080121/6ecb006a/attachment.vcf>
More information about the postgis-devel
mailing list