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

[mypyc] Faster int conversion in str.format #10774

Merged

Conversation

97littleleaf11
Copy link
Collaborator

Description

Closes mypyc/mypyc#875

Test Plan

  • Shorter IR code when calling tagged integer in str.format
  • 3.8x faster when running microbenchmark (master branch is about 3.6x)

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice improvement! Left a few minor comments, overall looks good.

mypyc/irbuild/specialize.py Outdated Show resolved Hide resolved
mypyc/irbuild/specialize.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JukkaL JukkaL merged commit eb1c525 into python:master Jul 8, 2021
@97littleleaf11 97littleleaf11 deleted the add-int-specializer-to-str-format branch August 5, 2021 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Faster str.format int conversion
2 participants