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

gh-143192 Avoid incref/decref pair in long_bitwise#143194

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
colesbury merged 3 commits intopython:mainfromeendebakpt:long_bitwise_incref_decref
Jan 29, 2026

Conversation

@eendebakpt
Copy link
Contributor

@eendebakpteendebakpt commentedDec 26, 2025
edited
Loading

By avoiding the incref/decref on the input arguments we avoid refcount contention in the FT build. Benchmark usingTools/ftscalingbench/ftscalingbench.py:

import randomdata = {'a': random.randint(int(10e45), int(10e46)), 'b': random.randint(int(10e45), int(10e46))}@register_benchmarkdef long_bitwise():    long_constant = data['a']    long_constant2 = data['b']    N = 1000 * WORK_SCALE      for i in range(N):        long_constant & long_constant2        long_constant | long_constant2        long_constant ^ long_constant2

Main:

Running benchmarks with 8 threadslong_bitwise               7.5x slower

PR

Running benchmarks with 8 threadslong_bitwise               5.4x faster

sergey-miryanov reacted with rocket emoji
Copy link
Contributor

@colesburycolesbury left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@colesburycolesbury merged commit1b08143 intopython:mainJan 29, 2026
50 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@colesburycolesburycolesbury approved these changes

@jlopezpenajlopezpenaAwaiting requested review from jlopezpena

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@eendebakpt@colesbury@jlopezpena

[8]ページ先頭

©2009-2026 Movatter.jp