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

gh-93476: Fraction.limit_denominator speed increase #93477

Closed

Commits on Jun 3, 2022

  1. pythongh-93476: Fraction.limit_denominator speed increases

    Create only one new Fraction object during `limit_denominator()` instead of the four previously made.
    
    Fixes python#93476
    
    I believe that each of the calls to `Fraction()` can be called with `_normalize=False` but I have not included that in this PR to limit the scope of changes to the minimum to verify no change in implementation.
    mscuthbert committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    599c55b View commit details
    Browse the repository at this point in the history
  2. add NEWS.d item

    mscuthbert committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    70ca7ad View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2022

  1. Fix boundary case.

    mscuthbert committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    a1a4fc8 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2022

  1. Review comments

    * Set variable naming according to existing cpython standards
    * confirm GCD of returned Fraction, and skip normalization
    * Respond and thanks to @mdickinson
    mscuthbert committed Jun 5, 2022
    Configuration menu
    Copy the full SHA
    3c06ded View commit details
    Browse the repository at this point in the history
  2. trailing space

    mscuthbert committed Jun 5, 2022
    Configuration menu
    Copy the full SHA
    e5ab32e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    40cbe78 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f5daa21 View commit details
    Browse the repository at this point in the history