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

Implement a benchmark algorithm Delaunay2D #38

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Implement a benchmark algorithm Delaunay2D #38

merged 1 commit into from
Oct 24, 2023

Conversation

Chubercik
Copy link
Contributor

@reduz
Copy link
Member

reduz commented Oct 14, 2023

Wow, great work!

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected.

However, this benchmark runs in roughly 2 ms on my i9-13900K with an optimized Linux editor binary. This means there's high potential for variance due to differences in setup time. We want to make sure we are benchmarking the actual triangulation logic, not the time it takes for the script to be parsed and compiled.

I suggest making it run more iterations so that running the benchmark requires 25× more time (it should take at least 50 ms on my CPU).

PS: delaunay2D.gd should be renamed to delaunay_2d.gd for consistency with other file names in the project.

@Chubercik
Copy link
Contributor Author

Committed an update which changes the number of points used by the algorithm from 1000 to 7000, which on my setup ups the benchmark's execution time from ~5.5ms to ~250ms - if this time I overdid the time it takes to complete be sure to hit me up and I'll fiddle with it further.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

It now takes 75 ms to run on my setup with a release build, which should be good enough for accurate measurements.

@Calinou Calinou merged commit 5017ee6 into godotengine:main Oct 24, 2023
@Chubercik Chubercik deleted the delaunay2D branch October 24, 2023 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants