Constant rustc_data_structures::sso::map::SSO_ARRAY_SIZE

source ·
const SSO_ARRAY_SIZE: usize = 8;
Expand description

For pointer-sized arguments arrays are faster than set/map for up to 64 arguments.

On the other hand such a big array hurts cache performance, makes passing sso structures around very expensive.

Biggest performance benefit is gained for reasonably small arrays that stay small in vast majority of cases.

‘8’ is chosen as a sane default, to be reevaluated later.