How can this work? Is SOME_CONST inlined and a completely new struct created? I would have expected that I need to call clone() because this sounds expensive.
I stumbled upon this in Making Safe Things From Unsafe Parts - Cliffle in the section "Removing the unsafe block from main". Changing a static mut to such a const + local variable makes the program faster, which I do not understand, either. I guess that now the struct is on the stack instead of some static RAM section, but why does this make it faster? In the section " Getting the static out" this made the program slower because Making Safe Things From Unsafe Parts - Cliffle.
Basically yes, constants are created anew each time they are mentioned. Mutations to that temporary value will not be seen in other instances of that same constant.
If your values are so big that a memcpy is a performance problem, you shouldn't be declaring them as const. Consider using static or lazy_static! instead.