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

Create a more generalized benchmark #84

Merged
merged 6 commits into from
Sep 17, 2024
Merged

Conversation

alicesaidhi
Copy link
Contributor

Implements benchmarks that allow for more insight on the performance of jecs that can be ran independently of the benchmarker plugin.

This currently implements benchmarks for the following operations:

  • creating entities
  • creating pairs
  • setting components
  • setting relationships
  • getting components
  • target
  • querying for archetypes with x amount of entities

@Ukendio
Copy link
Owner

Ukendio commented Jul 29, 2024

I was looking at the number of archetypes, and this benchmark actually creates one extra archetype than what is reported. This extra one should be removed.

@alicesaidhi
Copy link
Contributor Author

Are you sure the archetype is actually iterated over?

@Ukendio
Copy link
Owner

Ukendio commented Aug 2, 2024

Are you sure the archetype is actually iterated over?

Yeah, if you call #query:archetypes() and it returns that extra archetype, it will iterate over the archetype. It will switch if theres no entity though.

@Ukendio Ukendio merged commit 3276566 into Ukendio:main Sep 17, 2024
1 check passed
@Ukendio Ukendio changed the title Improve benchmark code Create a more generalized benchmark Sep 17, 2024
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.

2 participants