Slightly faster binary search pattern with a blend
This commit is contained in:
parent
a711eb72eb
commit
d665b90bbf
@ -167,7 +167,8 @@ def bin_search_vec{up, w:*i8, wn, x:*i8, n, res:*i8} = {
|
|||||||
s := U**0
|
s := U**0
|
||||||
h := h0
|
h := h0
|
||||||
@unroll (klog) {
|
@unroll (klog) {
|
||||||
s |= h &~ lt{xv, selw{s | h}}
|
m := s | h
|
||||||
|
s = homBlend{m, s, lt{xv, selw{m}}}
|
||||||
h = shr16{h, 1}
|
h = shr16{h, 1}
|
||||||
}
|
}
|
||||||
store{*U~~(res+j), 0, s - off}
|
store{*U~~(res+j), 0, s - off}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user