Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds pairwise_point_polygon_distance benchmark #1131

Merged

Conversation

isVoid
Copy link
Contributor

@isVoid isVoid commented May 9, 2023

Description

This PR separates the pairwise_point_polygon_distance benchmark portion of PR #1002. While that PR is only left for nvtx3 experiments.

Original PR description:

This PR adds pairwise point polygon distance benchmark. Depends on #998

Point-polygon distance performance can be affected by many factors, because the geometry is complex in nature. I benchmarked these questions:

  1. How does the algorithm scales with simple multipolygons?
  2. How does it scales with complex multipolygons?

How does the algorithm scales with simple multipolygons?

The benchmark uses the most simple multipolygon, 3 sides per polygon, 0 hole and 1 polygon per multipolygon.

Float32

Num multipolygon Throughput (#multipolygons / s)
1 28060.32971
100 2552687.469
10000 186044781
1000000 1047783101
100000000 929537385.2

Float64

Num multipolygon Throughput (#multipolygons / s)
1 28296.94817
100 2491541.218
10000 179379919.5
1000000 854678939.9
100000000 783364410.7

image

The chart shows that with simple polygons and simple multipoint (1 point per multipoint), the algorithm scales pretty nicely. Throughput is maxed out at near 1M pairs.

How does the algorithm scales with complex multipolygons?

The benchmark uses a complex multipolygon, 100 edges per ring, 10 holes per polygon and 3 polygons per multipolygon.

float32

Num multipolygon Throughput (#multipolygons / s)
1000 158713.2377
10000 345694.2642
100000 382849.058

float64

Num multipolygon Throughput (#multipolygons / s)
1000 148727.1246
10000 353141.9758
100000 386007.3016

image

The algorithm reaches max throughput at near 10K pairs. About 100X lower than the simple multipolygon example.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@isVoid isVoid requested review from a team as code owners May 9, 2023 23:39
@isVoid isVoid self-assigned this May 9, 2023
@github-actions github-actions bot added cmake Related to CMake code or build configuration libcuspatial Relates to the cuSpatial C++ library labels May 9, 2023
@isVoid isVoid added feature request New feature or request non-breaking Non-breaking change labels May 9, 2023
@isVoid
Copy link
Contributor Author

isVoid commented May 23, 2023

/merge

@rapids-bot rapids-bot bot merged commit 7f42eeb into rapidsai:branch-23.06 May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Related to CMake code or build configuration feature request New feature or request libcuspatial Relates to the cuSpatial C++ library non-breaking Non-breaking change
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants