[postgis-devel] ST_OrderingEquals and memcmp

Paul Ramsey pramsey at cleverelephant.ca
Mon Nov 17 09:32:07 PST 2014


You mean dropping out all the code for orderingequals? I’m a bit leary of that, yes. Particularly since there’s some things like optionality of bounding boxes which are not tightly controlled and could easily lead to false results.

P.

-- 
Paul Ramsey
http://cleverelephant.ca
http://postgis.net

On November 17, 2014 at 9:29:32 AM, Sandro Santilli (strk at keybit.net) wrote:

On Mon, Nov 17, 2014 at 09:03:49AM -0800, Paul Ramsey wrote:
> There’s only one pad hole, it's for polygons with an odd number of rings. I don’t know why it wouldn’t be consistently zero’ed out, since the pad is set with 
>  
> memset(loc, 0, sizeof(uint32_t));

The failure I saw was with point, some test under sfcgal.
But maybe it was my own implementation failing.
Shall I re-try and push the change as soon as it succeeds here ?

Would you like such a dropping-code change ?
In git terms:
1 file changed, 5 insertions(+), 26 deletions(-)

--strk;

> -- 
> Paul Ramsey
> http://cleverelephant.ca
> http://postgis.net
>  
> On November 17, 2014 at 7:12:49 AM, Sandro Santilli (strk at keybit.net) wrote:
>  
> I was reading the implementation of ST_OrderingEquals and wondered  
> why we're not using memcmp on the serialized memory.  
>  
> Saint testsuite revealed it can sometime fail.  
> I guess the reason for that is some "holes" in the serialized format  
> left for alignment purpose, does it sound correct ?  
>  
> Could we ensure serializers fill any hole to speedup identity checking ?  
>  
> --strk;  
>  
> () Free GIS & Flash consultant/developer  
> /\ http://strk.keybit.net/services.html  

> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel


--  

() Free GIS & Flash consultant/developer
/\ http://strk.keybit.net/services.html
_______________________________________________
postgis-devel mailing list
postgis-devel at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20141117/feb980bf/attachment.html>


More information about the postgis-devel mailing list