Btw, const parameters aren’t even necessarily good. From a low-level perspective, it’s harder to pass a record to a procedure by value, but easier to access from inside the procedure: ]
Another question, isn't it also slower to read from a pointer then if it was copied to the stack? If loading the value from the pointer is slower than reading from the stack then a parameter which was read often would benefit from copied anyways. No idea how this really works but it seems like the code generator should be doing this for us when it knows it's smart to do so.