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

Add extend and read to ringbuffer. #140

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

derekdreery
Copy link

I've been using the ringbuffer with its iterators and I can't get the computer to optimize copying, so I made some methods that do it manually. They need examples but I want to check you're interested first.

@mitchmindtree
Copy link
Member

Certainly interested, thanks for the PR! Let me know when the examples are in and you'd like me to take a closer look 👍

@derekdreery
Copy link
Author

After experimentation using copy_from_slice doesn't seem slower than ptr::copy_nonoverlapping and doesn't need unsafe, so I'm using that.

Also add examples and remove unsafe.
@derekdreery
Copy link
Author

Ready for review.

@derekdreery
Copy link
Author

friendly bump

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.

None yet

2 participants