diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-06-20 08:38:23 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-06-20 08:41:07 +0100 |
| commit | 2b677d1660018434757f9c9efec3c712675e6c47 (patch) | |
| tree | b0c05ac895e1e42abca677a135caf34d15173d24 /test/cases/compile_errors/export_generic_function.zig | |
| parent | 6a8cf25a8aea11ef80b48c9bce59d0aafcff3297 (diff) | |
| download | zig-2b677d1660018434757f9c9efec3c712675e6c47.tar.gz zig-2b677d1660018434757f9c9efec3c712675e6c47.zip | |
Sema: fix performance regression
LLVM fails to notice that in release builds, `logFn` ignores its
arguments, so their computation can be elided. So, LLVM fails to elide
this hashmap lookup. Its cost isn't too significant, but doing it in the
hottest loop in Sema adds up!
Technically, we could do the lookup a single time, before the loop, but
it was cleanest (and a little faster) to just disable this log call at
comptime when debug logging is disabled.
Diffstat (limited to 'test/cases/compile_errors/export_generic_function.zig')
0 files changed, 0 insertions, 0 deletions
