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

perf: using dirty bool instead of index #962

Closed
wants to merge 1 commit into from
Closed

Conversation

James-Frowen
Copy link
Member

Sends 1 bit for each component instead of 8 bits per dirty components.

@github-actions github-actions bot added the has conflicts Pull Request has merge conflicts label Oct 21, 2021
@dragonslaya84
Copy link
Member

This still in draft state? What was the whole plan and initial design around this. The more we squeeze performance or squeeze down the bytes during spawn / sending messages the better. So did this not pan out?

@James-Frowen
Copy link
Member Author

This was just a rough idea to try it out, I think it works.

One of the downsides is that it is not always less bytes. if you have 9 components, but only 1 of them changes, you'll now be sending 9 bits, instead of 8 bits (the index as byte).

The Optimal way would be to send a bool to say if the message is using index or mask. but this level of optimization might not be worth it because it'll only be saving bits.

Once I start optimizing my game projects I'll be able to test this changes to see how much of a difference they make for real.

@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Dec 23, 2021
@github-actions github-actions bot closed this Dec 31, 2021
@paulpach paulpach deleted the dirty-bool branch October 18, 2022 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has conflicts Pull Request has merge conflicts Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants