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

Make BBBuffer generic over the index variables #42

Open
jamesmunns opened this issue Dec 4, 2019 · 3 comments
Open

Make BBBuffer generic over the index variables #42

jamesmunns opened this issue Dec 4, 2019 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@jamesmunns
Copy link
Owner

jamesmunns commented Dec 4, 2019

It would be nice to use atomic types smaller than usize for tracking variables. This could be a significant size savings for buffers like BBBuffer<U128> (18 bytes vs 6 bytes overhead on a 32-bit target).

This should be possible by following the tricks used by heapless, and could be made backwards compatible to alias current constructors to use usize as the generic parameter.

@jamesmunns jamesmunns added this to the v0.4.x milestone Dec 4, 2019
@jamesmunns
Copy link
Owner Author

This would also help in making this mergable into heapless, CC rust-embedded/heapless#65

@jamesmunns jamesmunns added enhancement New feature or request help wanted Extra attention is needed labels Apr 12, 2020
@jamesmunns
Copy link
Owner Author

CC @korken89, who I think is better at generic shenanigans that I am :)

@korken89
Copy link

Yeah, this is no problem to do, ping me if you want some help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants