As per #1119, adds equalToScaledDecimal: double-dispatch handler in various ArithmeticValue subclasses.
To optimise SmallInteger=ScaledDecimal comparisons I initially added an implementation of = to Integer (implemented as per the primitive fallback code in LargeInteger>>#=) however this had a negative effect on SmallInteger=Float comparisons. Instead the performance of SmallInteger=ScaledDecimal comparisons has been improved by optimising Integer-ScaledDecimal subtractions - see ScaledDecimal>>#subtractFromInteger:. ScaledDecimal creation has also been optimised slightly by use of primitive 157.
As per #1119, adds
equalToScaledDecimal:
double-dispatch handler in various ArithmeticValue subclasses.To optimise SmallInteger=ScaledDecimal comparisons I initially added an implementation of
=
to Integer (implemented as per the primitive fallback code inLargeInteger>>#=
) however this had a negative effect on SmallInteger=Float comparisons. Instead the performance of SmallInteger=ScaledDecimal comparisons has been improved by optimising Integer-ScaledDecimal subtractions - seeScaledDecimal>>#subtractFromInteger:
. ScaledDecimal creation has also been optimised slightly by use of primitive 157.Resolves #1119.