aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authordjg <sentientwaffle@gmail.com>2022-01-10 20:54:45 -0800
committerGitHub <noreply@github.com>2022-01-10 23:54:45 -0500
commit4731a6e5d57d5fe6c17c42028aebd9fce3682ddb (patch)
tree31ae73c4f9a63387c4ab2079f8f74b27015e95da /lib/std/Thread.zig
parentada8e171373017cfd2a92267797c473c02aba130 (diff)
downloadzig-4731a6e5d57d5fe6c17c42028aebd9fce3682ddb.tar.gz
zig-4731a6e5d57d5fe6c17c42028aebd9fce3682ddb.zip
std: hash_map: optimize isFree/isTombstone (#10562)
- Add an `Metadata.isFree` helper method. - Implement `Metadata.isTombstone` and `Metadata.isFree` with `@bitCast` then comparing to a constant. I assume `@bitCast`-then-compare is faster than the old method because it only involves one comparison, and doesn't require bitmasking. - Summary of benchmarked changes (`gotta-go-fast`, run locally, compared to master): - 3/4 of the hash map benchmarks used ~10% fewer cycles - The last one (project Euler) shows 4% fewer cycles.
Diffstat (limited to 'lib/std/Thread.zig')
0 files changed, 0 insertions, 0 deletions