there used to be parameter reference optimisation, where zig would turn parameters into pointers for you if they were large enough.
But it was removed as it could cause illegal/unintended behaviour.
The optimiser could and likely will make that optimisation anyway as parameters are const.
The hash map has no idea what is faster, not to mention those inner functions are public so can be called by you, a copy is semantically correct.