Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace quicktions with built-in fractions #1489

Closed
trevorbaca opened this issue Oct 30, 2022 · 0 comments · Fixed by #1490
Closed

Replace quicktions with built-in fractions #1489

trevorbaca opened this issue Oct 30, 2022 · 0 comments · Fixed by #1490
Assignees
Labels
Milestone

Comments

@trevorbaca
Copy link
Member

Third-party quicktions raises an import error under Python 3.11. The replacement is the fractions module in Python's standard library.

Background. Years ago, the decision was made to replace built-in fractions with third-party quicktions. The near 10x speed increase provided by quicktions seemed important, especially at the time of Josiah's implementation of Abjad's timespan collection logic for Josiah's dissertation. Two things make quicktions no longer necessary. First, over successive releases of Python 3.x, built-in fractions has become increasingly performant: the quicktions pypi page indicates that quicktions may only be 2x faster than built-in fractions under Python 3.10. Second, the significant performance enhancements I added to Abjad in 2022 probably render the original problem moot: I think the original problem wasn't the performance of rational construction but rather calls to Python's (costly) inspect module for object comparison. Those calls to inspect are now all removed from 2022-era versions of Abjad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant