I had a method on a struct which was, due to code changes, marked mutating, when in fact it no longer mutated the struct at all.
I was surprised that removing the keyword "mutating" made things a bit slower.
Why would simply adding the word "mutating" make calling a method on a struct be faster?
(I edited this after it was posted. Originally, it was that adding mutating slowed it down. It was the other way around in fact.) The curious thing here is that the code in question is not mutating at all; and there shouldn't be a reason that marking it as mutating or not actually changes performance.
That's the issue here, not whether it's slower or faster. It really ought to be about the same, either way.