dasp icon indicating copy to clipboard operation
dasp copied to clipboard

Add `extend` and `read` to ringbuffer.

Open richard-uk1 opened this issue 4 years ago • 4 comments

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.

richard-uk1 avatar Nov 14 '20 20:11 richard-uk1

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

mitchmindtree avatar Nov 15 '20 12:11 mitchmindtree

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

richard-uk1 avatar Nov 16 '20 18:11 richard-uk1

Ready for review.

richard-uk1 avatar Nov 16 '20 20:11 richard-uk1

friendly bump

richard-uk1 avatar Dec 16 '20 17:12 richard-uk1