After a quick google to make sure my suspicions were true, I came to this conclusion. Using the +
operator to convert to a number is faster, because no mathematical operations occur after type-casting, whereas using the *=
approach means that after after
is converted, it will be multiplied by 1
.