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 Core benchmarks #40

Merged
merged 3 commits into from
Oct 22, 2023
Merged

Conversation

hakro
Copy link
Contributor

@hakro hakro commented Oct 15, 2023

Implements the following benchmarks in the Core section from #36 :

🟪Algorithm🟪 StringNames: Creating and freeing 1000 StringNames
🟪Algorithm🟪 NodePaths: Creating and freeing 1000 NodePaths
🟪Algorithm🟪 Strings: Create a benchmark that runs all complex search/merge/etc string operations 50 times.
🟪Algorithm🟪 ConfigFileSave / ConfigFileLoad: Create a ConfigFile full of fields and sections (1000). Benchmark saving and benchmark loading.

NB: 1000 iterations for NodePath and StringName was too small and insignificant, so I bumped that up to 1M.

Edit: I did create a string_manipulation.gd in the core dir that tests most String methods, but it turns out, it was already done in the gdscript directory. So I removed mine, thus the strikethrough above.

@hakro hakro force-pushed the benchmark-core-algo branch from 7680d37 to 3930069 Compare October 15, 2023 21:20
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.

Thanks!

Benchmarks take between 13 and 28 ms to run on my i9-13900K with an optimized Linux binary, which sounds reasonable to avoid too much variance from occurring due to unrelated tasks (such as script parsing).

@Calinou Calinou merged commit 14806b1 into godotengine:main Oct 22, 2023
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.

2 participants