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 fast paths of integer unboxing operations#17266

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 12 commits intomasterfrommypyc-int-unbox-inline
Jun 17, 2024

Conversation

@JukkaL
Copy link
Collaborator

This applies toint and native integer types.

This speeds up this micro-benchmark by up to 80% (it spends most of the time
unboxing integers):

# a is list[int]/list[i64]/...for i in a:    if i == 789:        n += 1

The impact to compile time when self-compiling is below the noise floor. The generated
binary is about 0.1% larger. Since integer unboxing can be performance-critical,
this seems like a decent win.

Closesmypyc/mypyc#987. Work onmypyc/mypyc#757.

}
}
/* Haven't lost any bits, but casting to long requires extra
* care (see comment above).
Copy link
Member

Choose a reason for hiding this comment

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

Maybe copy the comment referred here for completeness?

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

I wasn't sure what it referred to, so I just removed the reference to the comment.

@JukkaLJukkaL merged commit31faa43 intomasterJun 17, 2024
@JukkaLJukkaL deleted the mypyc-int-unbox-inline branchJune 17, 2024 09:55
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.

Faster native int unboxing

3 participants

@JukkaL@ilevkivskyi

[8]ページ先頭

©2009-2025 Movatter.jp