Skip to content

Conversation

@eendebakpt
Copy link
Contributor

@eendebakpt eendebakpt commented Dec 26, 2025

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

import random
data = {'a': random.randint(int(10e45), int(10e46)), 'b': random.randint(int(10e45), int(10e46))}

@register_benchmark
def 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 threads
long_bitwise               7.5x slower

PR

Running benchmarks with 8 threads
long_bitwise               5.4x faster

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.

1 participant