Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[mypyc] Inline tagged integer arithmetic and bitwise operations#17265

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 8 commits intomasterfrommypyc-int-inline
Jun 6, 2024

Conversation

@JukkaL
Copy link
Collaborator

Inline the fast path of various tagged integer operations by using C inline functions.
Most of these operations are very quick, so getting rid of the overhead of a C call
improves performance significantly. This also enables the C compiler to optimize
things more, if there are constant operands, for example.

This speeds up an older version of the richards benchmark, which didn't use native
integers, by 10% (on CPython 3.12). Even bigger improvements are possible in
some microbenchmarks.

We didn't do this in the past because of worries about compilation time. However,
I couldn't measure an impact to self-compilation speed, and the binary size is
only increased by about 0.1%.

Work onmypyc/mypyc#757.

Copy link
Member

@ilevkivskyiilevkivskyi left a comment

Choose a reason for hiding this comment

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

Good idea!

@JukkaLJukkaL merged commit09c48a4 intomasterJun 6, 2024
@JukkaLJukkaL deleted the mypyc-int-inline branchJune 6, 2024 09:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ilevkivskyiilevkivskyiilevkivskyi approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@JukkaL@ilevkivskyi

[8]ページ先頭

©2009-2025 Movatter.jp