Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cty: Optimize equality check for numbers of differing signs
This improves performance when comparing large numbers to zero, along with comparing large numbers of different signs. Without this special case, the numbers are both converted to text, and string compared, which is costly if the numbers are large. This provides a cheap early-exit path if the signs don't match, speeding up the cost of comparison to zero. As part of this, the .Modulo function calling .RawEquals should also have significantly improved performance (which was otherwise an expensive check for large numbers).
- Loading branch information