Author: Antonio Cuni <[email protected]>
Branch: fastjson
Changeset: r65050:da468fc481b3
Date: 2013-06-26 18:49 +0200
http://bitbucket.org/pypy/pypy/changeset/da468fc481b3/
Log: this gives a ~30% speedup: it's the same speedup which was observed
in 24a2398ade5b but got lost when the function became too big and
stopped to become automatically inlined
diff --git a/pypy/module/_fastjson/interp_decoder.py
b/pypy/module/_fastjson/interp_decoder.py
--- a/pypy/module/_fastjson/interp_decoder.py
+++ b/pypy/module/_fastjson/interp_decoder.py
@@ -159,6 +159,7 @@
return i, 0
i, intval, _ = self.parse_digits(i)
return i, sign * intval
+ parse_integer._always_inline_ = True
def parse_digits(self, i):
"Parse a sequence of digits as a decimal number. No sign allowed"
@@ -175,7 +176,7 @@
if count == 0:
self._raise("Expected digit at char %d", i)
return i, intval, count
-
+
def decode_array(self, i):
w_list = self.space.newlist([])
start = i
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit