This allocation of a KeySet view is small but rather hot, and we can take advantage by the fact that the returned Set is never modified. Ideally we should return a different type which makes the immutability contract explicit, which could unlock further optimisations, but this will need a bit of care as this is currently classified as an SPI. |