mirror of
https://github.com/python/cpython.git
synced 2026-06-07 20:10:55 -04:00
93930eaf0a
Add a fast-path for the common case.
Benchmark:
python -m pyperf timeit \
-s 'import math; gcd=math.gcd; x=2*3; y=3*5' \
'gcd(x,y)'
Result: 1.07x faster (-3.4 ns)
Mean +- std dev: 52.6 ns +- 4.0 ns -> 49.2 ns +- 0.4 ns: 1.07x faster
Source files for standard library extension modules, and former extension modules that are now builtin modules.