PyPy
PyPy Configuration[objspace.opcodes.CALL_LIKELY_BUILTIN]

objspace.opcodes.CALL_LIKELY_BUILTIN

back to parent

Basic Option Information

  • name: CALL_LIKELY_BUILTIN
  • description: emit a special bytecode for likely calls to builtin functions
  • command-line: --objspace-opcodes-CALL_LIKELY_BUILTIN
  • command-line for negation: --no-objspace-opcodes-CALL_LIKELY_BUILTIN
  • option type: boolean option
  • default: False
  • requirements:

Description

Introduce a new opcode called CALL_LIKELY_BUILTIN. It is used when something is called, that looks like a builtin function (but could in reality be shadowed by a name in the module globals). For all module globals dictionaries it is then tracked which builtin name is shadowed in this module. If the CALL_LIKELY_BUILTIN opcode is executed, it is checked whether the builtin is shadowed. If not, the corresponding builtin is called. Otherwise the object that is shadowing it is called instead. If no shadowing is happening, this saves two dictionary lookups on calls to builtins.

For more information, see the section in Standard Interpreter Optimizations.