Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mhdm
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
mhdm
3y ago
For a proper/sane forward iterator, front[index] is the same thing as *(front + index) and front + index achieves the same as std::advance(front, index) (just not in place). Or are you pointing out how first[length] and first += length
2.
▲
by
mhdm
3y ago
Then you'll want to look at https://mhdm.dev/posts/sb_lower_bound/#prefetching 100mb is large enough that the branchy version turns out to have a slight advantage, more due to quirks of x86 (speculative execu
3.
▲
by
mhdm
3y ago
Thanks, updated the footnote.
4.
▲
by
mhdm
3y ago
Prefetching is the right tradeoff for large arrays. Addressed at the end of the article: https://mhdm.dev/posts/sb_lower_bound/#prefetching
5.
▲
by
mhdm
3y ago
It was meant to link to rust's binary search implementation. Updated to https://doc.rust-lang.org/1.71.1/src/core/slice/mod.rs.html#...
6.
▲
by
mhdm
3y ago
Author here. I'm open to feedback and happy to answer questions.
7.
▲
Fastest Branchless Binary Search
(mhdm.dev)
4 points
by
mhdm
3y ago
|
1 comments
8.
▲
by
mhdm
3y ago
Author here, I'm open to feedback and happy to answer questions.
9.
▲
Branchless Binary Search – 2x faster than C++ std:lower_bound()
(mhdm.dev)
2 points
by
mhdm
3y ago
|
1 comments
10.
▲
by
mhdm
3y ago
Awesome game. Didn't think it was possible to LOSE at picking a password but there you have it. LOST at finding a 16m48s youtube video and a lovely passw0R.513mayIshellXXXV8pfxxtractAusingaporeRh8+ iamenough When entering the chess g