8000 fast-path checking finite decimals by davidhewitt · Pull Request #6769 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@davidhewitt
Copy link
Contributor
@davidhewitt davidhewitt commented Jul 20, 2023

Change Summary

When profiling pydantic/pydantic-core#763 I observed that the Python implementation of Decimal could improve on performance in the default case by using is_finite to check for finite values instead of first normalizing and then checking the exponent of the normalized value.

Related issue number

N/A

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @samuelcolvin

@davidhewitt
Copy link
Contributor Author

please review

@davidhewitt davidhewitt enabled auto-merge (squash) July 20, 2023 09:23
@davidhewitt davidhewitt merged commit a3f71c2 into main Jul 20, 2023
@davidhewitt davidhewitt deleted the dh/decimal-is-finite branch July 20, 2023 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0