aboutsummaryrefslogtreecommitdiff
path: root/src/print_targets.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-05-29 18:14:16 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:56 -0700
commit55cda9a592dd5aa030d1134351394e1014fefed1 (patch)
tree9d6f6d7d580260467de89ff9562e5ffda8f6d46e /src/print_targets.zig
parentf7177fb8215714f9f22e3f9da0d3c7d3ad58d390 (diff)
downloadzig-55cda9a592dd5aa030d1134351394e1014fefed1.tar.gz
zig-55cda9a592dd5aa030d1134351394e1014fefed1.zip
InternPool: avoid indexToKey recursion for ptr_slice
Recursion makes this hot function more difficult to profile and optimize. The ptr_slice encoding now additionally includes the slice type. This makes typeOf() implementable without indexToKey() as well as no longer using recursion in the ptr_slice prong of indexToKey itself. Unfortunately some logic had to be duplicated. However, I think that a future enhancement could eliminate the duplication as well as remove some other unwanted code, improving performance, by representing a slice value in `Key.Ptr` without `addr` populated directly, but with an `Index` pointing to the underlying manyptr value.
Diffstat (limited to 'src/print_targets.zig')
0 files changed, 0 insertions, 0 deletions