Speaking of hash tables, I'm interested in optimizing hash tables that are usually really small. [..]
-
-
Replying to @comex
I thought of having a 256-bit (aligned) key array, for up to 8 32-bit keys, and searching the whole thing with like 4 AVX instructions.
2 replies 0 retweets 1 like -
Replying to @comex
At that point a tiny binary search tree would probably be faster.
1 reply 0 retweets 0 likes -
Replying to @pcwalton
why? a binary search tree would be super branchy, whereas SIMD can search the entire table in one go
1 reply 0 retweets 0 likes -
Replying to @comex
Because you’re executing log(8) == 3 cmp+branch fused insns vs. 4 slower AVX instructions.
3 replies 0 retweets 0 likes -
-
-
Replying to @pcwalton
.
@pcwalton simd is fastest by far but none are terrible https://gist.github.com/comex/3694b05f1eb6347b8a5d2d3b4dc93e0a …3 replies 0 retweets 2 likes
Replying to @comex
Interesting! Thanks for testing it
1:10 PM - 27 Feb 2017
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.