Arithmetic operations defined in Julia do not modify their arguments.However, in many situations, a variable represents an accumulator that can be modified in-place to contain the result, e.g., when summing the elements of an array.Moreover, for types that support mutation, mutating the value may have a significant performance benefit over creating a new instance.This paper presents an interface that allows algorithms to exploit mutability in arithmetic operations in a generic manner.
No takes yet. Share an insight, caveat, or question.
Benoît Legat (2024) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: