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

InfiniInt<T> small-storage optimization #44

Open
oscbyspro opened this issue Jul 12, 2024 · 1 comment
Open

InfiniInt<T> small-storage optimization #44

oscbyspro opened this issue Jul 12, 2024 · 1 comment
Labels
brrr such code, much wow maybe to do, or not to do?

Comments

@oscbyspro
Copy link
Owner

oscbyspro commented Jul 12, 2024

InfiniInt<T> stores an array at the moment. I've occasionally thought about storing an enum that contains an array or one element. After more deliberation, I believe a tagged pointer (#43) is a better optimization. The latter ensures that the inline model fits in a register and there are still ptr - 1 bits to work with.

@oscbyspro oscbyspro added brrr such code, much wow maybe to do, or not to do? labels Jul 12, 2024
@oscbyspro oscbyspro changed the title Idea: InfiniInt\<T\> small storage optimization Idea: InfiniInt<T> small storage optimization Jul 12, 2024
@oscbyspro
Copy link
Owner Author

oscbyspro commented Jul 12, 2024

Also, the compact bit count eliminates an annoying edge case (#3) (#6).

@oscbyspro oscbyspro changed the title Idea: InfiniInt<T> small storage optimization Idea: InfiniInt<T> small-storage optimization Jul 12, 2024
@oscbyspro oscbyspro changed the title Idea: InfiniInt<T> small-storage optimization InfiniInt<T> small-storage optimization Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brrr such code, much wow maybe to do, or not to do?
Projects
None yet
Development

No branches or pull requests

1 participant