aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-05-26 21:14:18 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:56 -0700
commitc8b0d4d149c891ed83db57fe6986d10c5dd654af (patch)
tree80074b404e9d6b425e233e534f43ffa2c7d96ba9 /src/Module.zig
parentfc358435cb5cbcc21967af438b190d4e18bba9ae (diff)
downloadzig-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