dash
dash copied to clipboard
dash::equal does not work for non-trivial ranges
The current implementation of dash::equal is both highly inefficient, as well as erroneous.
As the implementation internally operates on the local parts of the first range, the distribution of the second is not honored.
Consider the following example, where the | denote the "borders" of a unit. Logically both ranges are equal.
First: |x x x x|x x x x|x x x x|
Second: x|x x x x|x x x x|x x x |
In this case the current implementation even segfaults, as it reads past the local second range.
See PR #509 for details.
Pull #509 is merged long time ago. Can we close this issue?
Actually not, as the PR just fixes trivial ranges. Non-Trivial ranges (like the example above) are still not supported.
Also have a look at this (currently disabled) unit test: https://github.com/dash-project/dash/pull/509/files#diff-c82107809db03e2103249f9bb3de4956R43