[geos-devel] A little performance test: NTS VS GEOS

Oyvind Idland oyvind.idland at gmail.com
Wed Aug 10 05:52:25 EDT 2011


Hello,

I did a little performance test just to test GEOS vs NTS. I have made a
C++/CLI wrapper for .NET, and the tests was
run using PreparedGeometries in GEOS (NTS does not have this feature yet).

In all tests i have done, NTS outperformed GEOS in the total summary.
The reason ? WkbReader. On the pure geometry operations (Overlaps,
Intersects etc), GEOS is at least twice as
fast (possibly faster too in some cases). In my case, I do WKB --> Geometry
on the fly, and the actual conversion
perfomance is a bit disappointing.

Below there are two testresult outputs: Both is executed against a dataset
containing 10721 polygons, where one
uses a LineString operand, the other a Polygon operand. The result shows the
operand being used, the time for WKB
conversion and operand times.

I believe there are potential here...


-- Oyvind





------------------------------------------------------------------------------------------------------------------------
Operand:POLYGON ((538213.275331 6544838.215101, 538312.712452
6545313.648834, 538940.409276 6545621.282426, 540152.299185 6545394.441495,
540261.058536 6544841.322511, 54
0192.695515 6544493.292588, 539574.320921 6544362.781367, 539235.613228
6544213.625686, 538617.238634 6544431.144388, 537467.496926 6544201.196046,
538213.275331 6544838.
215101))

Results from GEOS tester, extent=[MinX=517365, MinY=6530944, MaxX=544938,
MaxY=6554152 width=27573 , height=23208]
Feature count: 10721
Crosses Count: 0
Intersects Count: 978
Covers Count: 128
Contains Count: 850
Time used for WKB: 824 millis
Time used for operand: 217 millis
Total time: 1041 millis


Results from NTS tester, extent=[MinX=517365, MinY=6530944, MaxX=544938,
MaxY=6554152 width=27573 , height=23208]
Feature count: 10721
Crosses Count: 0
Intersects Count: 978
Covers Count: 128
Contains Count: 850
Time used for WKB: 172 millis
Time used for operand: 527 millis
Total time: 699 millis
------------------------------------------------------------------------------------------------------------------------



------------------------------------------------------------------------------------------------------------------------
Operand:LINESTRING (538616.04842 6542972.503409, 539659.659719
6543126.67326, 540134.028491 6543049.588335, 540424.579364 6542883.559264,
540673.622969 6542658.234098, 54
0976.033062 6542770.896681, 541029.399549 6542978.433019, 541385.176128
6542782.7559, 541628.290123 6542338.035176)


Results from GEOS tester, extent=[MinX=517365, MinY=6530944, MaxX=544938,
MaxY=6554152 width=27573 , height=23208]
Feature count: 10721
Crosses Count: 54
Intersects Count: 54
Covers Count: 0
Contains Count: 0
Time used for WKB: 850 millis
Time used for operand: 110 millis
Total time: 960 millis

Results from NTS tester, extent=[MinX=517365, MinY=6530944, MaxX=544938,
MaxY=6554152 width=27573 , height=23208]
Feature count: 10721
Crosses Count: 54
Intersects Count: 54
Covers Count: 0
Contains Count: 0
Time used for WKB: 174 millis
Time used for operand: 247 millis
Total time: 421 millis
------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20110810/066b7ac4/attachment.html


More information about the geos-devel mailing list