benbovy / spherely

Manipulation and analysis of geometric objects on the sphere.
https://spherely.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
107 stars 6 forks source link

s2shapely vs. shapely preliminary benchmarks #4

Open benbovy opened 1 year ago

benbovy commented 1 year ago

The figures below show results from quick and naive benchmarks that compare the total (single thread) execution times for a few functions in shapely 2.0 vs. s2shapely. All benchmarks are run using 10 000 random x,y (lat,lon) points.

image

image

(Note: for all functions except "s2shapely.is_geography", the access to the wrapped C/C++ geo objects is almost direct -- in s2shapely it doesn't go through pybind11's complex conversion logic, see https://github.com/benbovy/s2shapely/issues/3#issuecomment-1332375997 and #5).

It is hardly comparable (different C/C++ libraries, different binding approaches), but it already highlights a few things: