That is how it's done. A single SvGETMAGIC if you read a scalar, no matter how many times you read it. A single SvSETMAGIC if you write to a scalar, no matter how many times you write to it.
And if you're processing a real array containing a million real scalars, then that's 2 million redundant, time consuming
function calls .
Addition: Were it possible to perform a single test on the array to detect magic, it might be worth doing to allow me to gracefully reject it. But as is, the only sensible option is to document that only real arrays of real scalars are acceptable input and fail noisily if I am given anything else.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.