Author: Antonio Cuni <[email protected]> Branch: Changeset: r45363:b1ad852a205d Date: 2011-07-06 14:37 +0200 http://bitbucket.org/pypy/pypy/changeset/b1ad852a205d/
Log: kill docs for the no longer available CALL_LIKELY_BUILTIN diff --git a/pypy/doc/interpreter-optimizations.rst b/pypy/doc/interpreter-optimizations.rst --- a/pypy/doc/interpreter-optimizations.rst +++ b/pypy/doc/interpreter-optimizations.rst @@ -157,32 +157,6 @@ A more advanced version of sharing dicts, called *map dicts,* is available with the :config:`objspace.std.withmapdict` option. -Builtin-Shadowing -+++++++++++++++++ - -Usually the calling of builtins in Python requires two dictionary lookups: first -to see whether the current global dictionary contains an object with the same -name, then a lookup in the ``__builtin__`` dictionary. This is somehow -circumvented by storing an often used builtin into a local variable to get -the fast local lookup (which is a rather strange and ugly hack). - -The same problem is solved in a different way by "wary" dictionaries. They are -another dictionary representation used together with multidicts. This -representation is used only for module dictionaries. The representation checks on -every setitem whether the key that is used is the name of a builtin. If this is -the case, the dictionary is marked as shadowing that particular builtin. - -To identify calls to builtins easily, a new bytecode (``CALL_LIKELY_BUILTIN``) -is introduced. Whenever it is executed, the globals dictionary is checked -to see whether it masks the builtin (which is possible without a dictionary -lookup). Then the ``__builtin__`` dict is checked in the same way, -to see whether somebody replaced the real builtin with something else. In the -common case, the program didn't do any of these; the proper builtin can then -be called without using any dictionary lookup at all. - -You can enable this feature with the -:config:`objspace.opcodes.CALL_LIKELY_BUILTIN` option. - List Optimizations ------------------ _______________________________________________ pypy-commit mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-commit
