diff options
| author | djg <sentientwaffle@gmail.com> | 2022-01-10 20:54:45 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-10 23:54:45 -0500 |
| commit | 4731a6e5d57d5fe6c17c42028aebd9fce3682ddb (patch) | |
| tree | 31ae73c4f9a63387c4ab2079f8f74b27015e95da /src/codegen/llvm.zig | |
| parent | ada8e171373017cfd2a92267797c473c02aba130 (diff) | |
| download | zig-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 'src/codegen/llvm.zig')
0 files changed, 0 insertions, 0 deletions
