diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-26 21:14:18 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:56 -0700 |
| commit | c8b0d4d149c891ed83db57fe6986d10c5dd654af (patch) | |
| tree | 80074b404e9d6b425e233e534f43ffa2c7d96ba9 /src/Module.zig | |
| parent | fc358435cb5cbcc21967af438b190d4e18bba9ae (diff) | |
| download | zig-c8b0d4d149c891ed83db57fe6986d10c5dd654af.tar.gz zig-c8b0d4d149c891ed83db57fe6986d10c5dd654af.zip | |
InternPool: optimize zigTypeTag()
This is a particularly hot function, so we operate directly on encodings
rather than the more straightforward implementation of calling
`indexToKey`.
I measured this as 1.05 ± 0.04 times faster than the previous commit
with a ReleaseFast build against hello world (which includes std.debug
and formatted printing).
I also profiled the function and found that zigTypeTag() went from being
a major caller of `indexToKey` to being completely insignificant due to
being so fast.
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions
