Intervals.jl
Intervals.jl copied to clipboard
Option to not do bounds checking?
It'd be nice if we could disable first and last order checking of arguments for performance reasons (maybe just don't have an inner constructor?).
If you wrap bounds checking in @boundscheck, I believe the checks will be elided when called with @inbounds.
I did some experimentation with @boundscheck and couldn't get it to work with this code. Additionally, I think using @inbounds here is misleading as what we really want to indicate is that the data in the constructor is ordered.
I think not having an inner constructor would be the least intrusive option.
I believe that we need to enforce that the left precedes the right. To remove that enforcement we would need to review the entire package to ensure there are no side effects.