-
Notifications
You must be signed in to change notification settings - Fork 83
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
Failing assertion in CCRingBuffer #126
Comments
Thanks for the report, I will look into it. |
It's actually possible that I break compatibility a bit, the current code is too complicated… |
That sounds reasonable. I'd suggest also splitting the module into a bounded and an unbounded version during that process. |
That might be the best, indeed… Or perhaps only split internally but use a phantom type to distinguish: type 'a t constraints t = [< `bounded|`unbounded]
val capacity : _ t -> int
val max_capacity : [`bounded] t -> int In any case this is probably the best course of action. |
- add some qcheck test comparing to reference implem - use bounded buffers only - use inefficient methods (for now)
I removed the unbounded API in ff77a6a, added strong tests, and fixed the bug. However, the fix is pretty basic (some functions like |
I always wanted to make blit_from optimized- it would be super easy if the
modulars were split too. Let me know if you want me to test anything or
contribute in any useful way.
…On Tue, Jun 13, 2017 at 2:44 PM, Simon Cruanes ***@***.***> wrote:
I removed the unbounded API in ff77a6a
<ff77a6a>,
added strong tests, and fixed the bug. However, the fix is pretty basic
(some functions like blit_from push items one by one instead of using
Array.blit). Now that the base implementation works I can more
confidently improve performance.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#126 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE01ooDrszobuuIgcKgondd6cAoCA_02ks5sDtibgaJpZM4NaMG->
.
|
@struktured you are welcome to try. It would be nice, for measuring performance, to put the current version into the benchmarks (as a reference impl) and iterate from there. With the new tests I'm a bit more confident in the correctness of the module. I think the tests can still be improved (e.g. by supporting more operations in the last random tests), but they're a big step in the right direction. |
Found an issue in |
I'll close this and move to #134 for further changes. |
It doesn't seem to happen with small buffers, so it's unclear which usage pattern produces this issue. The following reproduces the problem:
The text was updated successfully, but these errors were encountered: