mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 09:48:05 +03:00
e7a89e8c45
Summary: Use a dedicated Span type so we can enforce reverse ordering and `start <= end` directly on the Span structure. The constructor of `SpanSet` becomes more expensive because it recreates the `Vec`, and sorts it. Practically, hopefully it's fine. Internal logic like union will not use that constructor. Some comments and tweaks have been made to make the code easier to read. There are some performance changes, though: Before: intersection 5.030 ms union 5.920 ms difference 4.804 ms After: intersection 6.036 ms union 5.426 ms difference 4.710 ms `intersection` becomes slower, while `union` and `difference` become a bit faster. Hopefully the regression is within the acceptable range. Reviewed By: sfilipco Differential Revision: D15023651 fbshipit-source-id: ea7845d5d20faf204cfb85c66fc3bd6e25c9fc0c |
||
---|---|---|
.. | ||
benches | ||
src | ||
Cargo.toml |