[pypy-commit] pypy default: Minor performance improvement
arigo
pypy.commits at gmail.com
Sat Jan 2 20:22:46 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r81530:9dd3ef98eeae
Date: 2016-01-03 02:22 +0100
http://bitbucket.org/pypy/pypy/changeset/9dd3ef98eeae/
Log: Minor performance improvement
diff --git a/pypy/module/cpyext/longobject.py b/pypy/module/cpyext/longobject.py
--- a/pypy/module/cpyext/longobject.py
+++ b/pypy/module/cpyext/longobject.py
@@ -238,10 +238,9 @@
c = intmask(bytes[n - i - 1])
else:
c = intmask(bytes[i])
- digit = rbigint.fromint(c)
result = result.lshift(8)
- result = result.add(digit)
+ result = result.int_add(c)
if signed and c >= 0x80:
result = result.sub(ONERBIGINT.lshift(8 * n))
More information about the pypy-commit
mailing list