We can lay out Symbol more optimally to reduce its size from 56 bytes to
48 bytes by eliminating unnecessary padding, and we can lay out Defined
such that its bitfield members are placed in the tail padding of Symbol
(on ABIs which support this), to reduce it from 96 bytes to 80 bytes (8
bytes from the Symbol reduction, and 8 bytes from the tail padding
reuse).
This is perf-neutral for an internal app (results from two different
machines):
smol-syms baseline difference (95% CI) sys_time 7.430 ± 0.202 7.440 ± 0.193 [ -2.6% .. +2.9%] user_time 21.443 ± 0.513 21.206 ± 0.396 [ -3.3% .. +1.1%] wall_time 20.453 ± 0.534 20.222 ± 0.488 [ -3.7% .. +1.5%] samples 9 8 smol-syms baseline difference (95% CI) sys_time 3.011 ± 0.050 3.040 ± 0.052 [ -0.4% .. +2.3%] user_time 10.416 ± 0.075 10.496 ± 0.091 [ +0.1% .. +1.4%] wall_time 12.229 ± 0.144 12.354 ± 0.192 [ -0.1% .. +2.1%] samples 14 13
However, on the first machine, it reduces maximum resident set size by
65.9 MB (0.8%, from 7.92 GB to 7.85 GB). On the second machine, it
reduces it by 92 MB (1.4%, from 6.40 GB to 6.31 GB).