Skip to content

Benchmark boundary exclusion #742

Closed

Description

Background

In #739 I introduce boundary exclusion to the is_point_in_polygon kernel that is used both by the original point_in_polygon as well as quadtree_point_in_polygon.

This addition adds 6 multiplies and 15 adds to the kernel per iteration. Because we added python benchmarks in 22.10 I was able to benchmark the new feature branch against the 22.12 branch.

The benchmark runs each point_in_polygon algorithm on 50m points and 30 polygons taken from the naturalearth_lowres feature database that is available in GeoPandas. You can run the benchmark with

cd cuspatial/python/cuspatial/benchmarks
pytest api/bench_api.py::bench_point_in_polygon
pytest api/bench_api.py::bench_quadtree_point_in_polygon

The default benchmark only tests 10m points, not 50m. You'll have to modify the tests to change to 50m. Finally, to run the benchmark using the new is_point_in_polygon kernel requires that you checkout my PR branch and rebuild cuspatial cpp and python.

Benchmark result

On my machine with a GV100 the boundary-exclusion branch is 30% faster, for some reason, than the original, taking 871msec on 50m points with boundary-exclusion and 1161msec without the new changes. Quadtree point in polygon is 10% slower with boundary exclusion at 36msec and 32msec with the original.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

  • Status

    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions