Thanks Oyvind for the profiling. Yeah, WKB parser wasn't a priority as main user of the library (PostGIS) is using direct construction (via Points).
Nonetheless it's annoying to be slower than a .NET thing, so if anyone is willing to fund a WKB parser speedup improvement I'll be glad to work on it ;) --strk; On Wed, Aug 10, 2011 at 11:52:25AM +0200, Oyvind Idland wrote: > 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 > ------------------------------------------------------------------------------------------------------------------------ > _______________________________________________ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html _______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel