8000 Add a benchmark for kRing on a pentagon by isaacbrodsky · Pull Request #144 · uber/h3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add a benchmark for kRing on a pentagon #144

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

Merged
merged 2 commits into from
Sep 5, 2018

Conversation

isaacbrodsky
Copy link
Collaborator

This case falls back to the DFS approach which is much slower
than non-pentagon cases.

This case falls back to the DFS approach which is much slower
than non-pentagon cases.
Copy link
Collaborator
@nrabinowitz nrabinowitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do you mind posting the new benchmark results when you add a benchmark, just to give the reviewer a sense of scale?

BEGIN_BENCHMARKS();

setH3Index(&pentagon, 9, 4, CENTER_DIGIT);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but I don't see any issue just using the indexes of "well-known pentagons" directly in tests. If you tell me a test address is a pentagon, I'll believe you :).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to first calculate the index of the pentagon :)

@coveralls
Copy link
coveralls commented Sep 4, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling c6901f1 on isaacbrodsky:benchmark-kring-pentagon into f4f4658 on uber:master.

@isaacbrodsky
Copy link
Collaborator Author

Here's a sample run:

	-- kRing10: 26.303700 microseconds per iteration (10000 iterations)
	-- kRing20: 97.999600 microseconds per iteration (10000 iterations)
	-- kRing30: 216.685200 microseconds per iteration (10000 iterations)
	-- kRing40: 378.882100 microseconds per iteration (10000 iterations)
	-- kRingPentagon10: 724.058000 microseconds per iteration (500 iterations)
	-- kRingPentagon20: 6407.490000 microseconds per iteration (500 iterations)
	-- kRingPentagon30: 20842.580000 microseconds per iteration (50 iterations)
	-- kRingPentagon40: 47637.800000 microseconds per iteration (10 iterations)

@isaacbrodsky isaacbrodsky merged commit dfcb55e into uber:master Sep 5, 2018
@isaacbrodsky isaacbrodsky deleted the benchmark-kring-pentagon branch September 5, 2018 20:53
mrdvt92 pushed a commit to mrdvt92/h3 that referenced this pull request Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0