Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
speed up Rat addtion by reducing lazily
About 20% faster when adding a bunch of things with the same denominator. We do this by being lazy about reducing the fractions till we need them reduced, that is, when we're about to display them in a way that reveals the .nude bits, or compare them in a way which needs to know integer status.
- Loading branch information
Showing
2 changed files
with
63 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters