[pypy-commit] pypy kill-more-multimethods: remove performance hack
fijal
noreply at buildbot.pypy.org
Wed Jan 25 17:15:22 CET 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: kill-more-multimethods
Changeset: r51765:5ab71bed7f64
Date: 2012-01-25 18:14 +0200
http://bitbucket.org/pypy/pypy/changeset/5ab71bed7f64/
Log: remove performance hack
diff --git a/pypy/objspace/std/objspace.py b/pypy/objspace/std/objspace.py
--- a/pypy/objspace/std/objspace.py
+++ b/pypy/objspace/std/objspace.py
@@ -544,19 +544,6 @@
else:
self.setitem(w_obj, self.wrap(key), w_value)
- def getindex_w(self, w_obj, w_exception, objdescr=None):
- # Performance shortcut for the common case of w_obj being an int.
- # If withsmallint is disabled, we check for W_IntObject.
- # If withsmallint is enabled, we only check for W_SmallIntObject - it's
- # probably not useful to have a shortcut for W_IntObject at all then.
- if self.config.objspace.std.withsmallint:
- if type(w_obj) is W_SmallIntObject:
- return w_obj.intval
- else:
- if type(w_obj) is W_IntObject:
- return w_obj.intval
- return ObjSpace.getindex_w(self, w_obj, w_exception, objdescr)
-
def call_method(self, w_obj, methname, *arg_w):
if self.config.objspace.opcodes.CALL_METHOD:
return callmethod.call_method_opt(self, w_obj, methname, *arg_w)
More information about the pypy-commit
mailing list