JustForFun88
JustForFun88
> Signed-off-by: Hanif Ariffin [[email protected]](mailto:[email protected]) Xm... previous implementation use only 3 checks per iteration: 1. That we inside cells range; 2. Checking col_start; 3. Checking col_end. The new one will...
> Should I add more pairs to match? Looks like [Helix](https://github.com/helix-editor/helix/blob/master/helix-core/src/match_brackets.rs#L5) is also matching on `` ... I think matching on `` would be nice ... It would be very...
> Should an `unsafe _unchecked` function also be added? Hashing and comparing the `insert_value` should be unnecessary if this function is used properly. Well, strictly speaking, rehashing was present in...
> There is a much longer discussion about this in [rust-lang/rust#60896](https://github.com/rust-lang/rust/issues/60896), which is about the equivalent (unstable) method in the standard library. I would prefer to keep the API as...
@matthieu-m It seems to me that you did not take into account that on the x64 platform the expression `let top8 = hash >> (MIN_HASH_LEN * 8 - 7)` is...
> This switches from the top 8 to the bottom 8 bits, and will overlap with `h1`. Is there a reason to prefer to the bottom 8 (and adjust `h1`)...
@matthieu-m I carefully looked at the implementation and you are right, it is not possible to use values other than **127_i8** and **126_i8**. In addition to your improvements, I also...
> Ah of course! ^^ Then I guess if n is too large just sorting the pointers and checking for no consecutive dupes works in `O(n* log(n))`. Unlikely, since you...
> > Unlikely, since you still need to take into account the sort itself > > The sort itself is `O(n* log(n))` where n is the number of queried entries....
> I do, that's what the `ptrs.clone()` is for. I'm returning `ptrs` at the end. If we want to have a single alloc we could also `with_capacity(n*2)` and duplicate the...