inout parameters are not, and have never been, direct abstractions over the original storage where loads and stores to the parameter immediately trigger the corresponding operations on the original storage. That would not be a good model for a lot of reasons: the value of the parameter could potentially change arbitrarily throughout the function, getters and setters could be triggered repeatedly, and so on. Instead, the parameter is bound to a temporary (if the storage isn't simply stored) which is filled by a single read and, eventually, written back with a single write. This is a slight loss if the function never reads or writes to its parameter and a huge win in basically every other case.
8 Likes