[geos-devel] Performance of GEOS compared to JTS (Report, Nov. 8)

Martin Davis mbdavis at VividSolutions.com
Fri Nov 8 19:47:44 EST 2002


Good stuff....  

Some coments:

- With further thought, I've realized that technically this test should exhibit linear performance in both JTS and GEOS (since the code has to *at least* scan all the points of the geometries!).  GEOS now certainly shows this.  It remains to be determined why JTS appears to be better than linear!   Ultimately I think JTS will show linear time, with big enough geometries.  I'll change my test to scale up by multiples of two like Pauls, and we'll see what happens [by the way, we should all use the same test sizes, for ease of comparison].  I think there must be something in the GEOS code that is sensitive to the number of coordinates and that dominates the performance, so that it's linear from the outset.  

I would still expect that the C++ code should be absolutely faster than Java - so we still have some sleuthing to do.

Another test would be to have *both* geometries increasing in size - this will stress the indexing a bit more.  I'll do something here and post the results (and code, for Yury to port).

Martin Davis, Senior Technical Specialist
Vivid Solutions Inc.
Suite #1A-2328 Government Street   Victoria, B.C.   V8T 5G5
Phone: (250) 385 6040    Fax: (250) 385 6046
EMail: mbdavis at vividsolutions.com  Web: www.vividsolutions.com


> -----Original Message-----
> From: Paul Ramsey [mailto:pramsey at refractions.net]
> Sent: Friday, November 08, 2002 1:08 PM
> To: geos-devel at geos.refractions.net
> Subject: RE: [geos-devel] Performance of GEOS compared to JTS (Report,
> Nov. 8)
> 
> 
> Here are the Linux tests again... Yury, you have to 
> explicitly include stdio.h 
> in the tester in order to get printf under GNU...
> 
> # overlapping MCs: 44
> # segment intersection tests: 7
> n Pts: 1000  Executed in     10 ms.
> # overlapping MCs: 44
> # segment intersection tests: 4
> n Pts: 2000  Executed in     30 ms.
> # overlapping MCs: 44
> # segment intersection tests: 4
> n Pts: 4000  Executed in     70 ms.
> # overlapping MCs: 44
> # segment intersection tests: 4
> n Pts: 8000  Executed in    160 ms.
> # overlapping MCs: 44
> # segment intersection tests: 4
> n Pts: 16000  Executed in    330 ms.
> # overlapping MCs: 44
> # segment intersection tests: 4
> n Pts: 32000  Executed in    660 ms.
> # overlapping MCs: 44
> # segment intersection tests: 4
> n Pts: 64000  Executed in   1300 ms.
> # overlapping MCs: 44
> # segment intersection tests: 4
> n Pts: 128000  Executed in   2600 ms.
> 
> 
> Quoting Martin Davis <mbdavis at VividSolutions.com>:
> 
> > Excellent work, Yury.
> > 
> > But we're not done yet....  I can't see any reason why GEOS 
> should be
> > *slower* than JTS!  (I assume this comparison is made on 
> the same hardware
> > configuration...)  Perhaps we need to do some more memory 
> management tuning
> > ...  Better put your nifty vtune profiler to work before it 
> timebombs.
> > 
> > Martin Davis, Senior Technical Specialist
> > Vivid Solutions Inc.
> > Suite #1A-2328 Government Street   Victoria, B.C.   V8T 5G5
> > Phone: (250) 385 6040    Fax: (250) 385 6046
> > EMail: mbdavis at vividsolutions.com  Web: www.vividsolutions.com
> > 
> > 
> > > -----Original Message-----
> > > From: Yury A. Bychkov [mailto:ybychkov at direct.ca]
> > > Sent: Friday, November 08, 2002 11:51 AM
> > > To: geos-devel at geos.refractions.net
> > > Subject: [geos-devel] Performance of GEOS compared to JTS
> > > (Report, Nov.
> > > 8)
> > >
> > >
> > > Success !!!
> > >
> > > I found a good profiler for Windows (VTune from Intel) and
> > > tracked down some of
> > > the problems that caused bad performance. They were mostly
> > > linked with copying
> > > and destroying vectors of Coordinates. I've fixed the worst
> > > of them and now
> > > GEOS's performance is drastically improved (though it is
> > > still slower then JTS).
> > > New version has been committed to the CVS.
> > >
> > > Results:
> > > # overlapping MCs: 36
> > > # segment intersection tests: 39
> > > n Pts: 10  Executed in     10 ms.
> > > # overlapping MCs: 40
> > > # segment intersection tests: 26
> > > n Pts: 100  Executed in     10 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 7
> > > n Pts: 1000  Executed in     90 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 4
> > > n Pts: 2000  Executed in    100 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 7
> > > n Pts: 3000  Executed in    220 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 4
> > > n Pts: 4000  Executed in    271 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 5
> > > n Pts: 5000  Executed in    330 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 7
> > > n Pts: 6000  Executed in    381 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 6
> > > n Pts: 7000  Executed in    470 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 4
> > > n Pts: 8000  Executed in    460 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 5
> > > n Pts: 9000  Executed in    581 ms.
> > > # overlapping MCs: 44
> > > # segment intersection tests: 5
> > > n Pts: 10000  Executed in    681 ms.
> > >
> > >
> > > Yury
> > >
> > >
> > >
> > > _______________________________________________
> > > geos-devel mailing list
> > > geos-devel at geos.refractions.net
> > > http://geos.refractions.net/mailman/listinfo/geos-devel
> > >
> > 
> > _______________________________________________
> > geos-devel mailing list
> > geos-devel at geos.refractions.net
> > http://geos.refractions.net/mailman/listinfo/geos-devel
> > 
> > 
> 
> 
> 
> 
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
> 
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel
> 




More information about the geos-devel mailing list