[geos-devel] RE: LineSegment copy removal, ABI protection 2

strk at refractions.net strk at refractions.net
Mon Jun 27 17:20:04 EDT 2005


On Mon, Jun 27, 2005 at 12:58:21PM -0700, Martin Davis wrote:
> > Martin, should LineSegment store REAL coordinates or can it 
> > safely store references to them ?
> 
> References should be safe - LineSegment never changes its coordinates.
> It may reorder them, however (but this should work with references,
> right)?
> 
> I didn't get the attachment - is this a fix that might be good for JTS
> too?

Ok, first of all I'm fried, sorry. My timings were distorder
by the profiler. W/out specific profiling calls comparison
is:

With LineSegment::reverse calls
        real    0m35.149s
        user    0m30.244s
        sys     0m1.231s

Without LineSegment::reverse calls
        real    0m29.858s
        user    0m29.043s
        sys     0m0.121s

About porting to JTS, I'm not sure it will influence things
as JTS is probably NOT making copies of Coordinate.
Am I wrong ?

XML test is available from:
http://foo.keybit.net/~strk/tmp/test.xml.bz2

--strk;



More information about the geos-devel mailing list