# PyPy Configuration[objspace.opcodes.CALL_LIKELY_BUILTIN]

PyPy Configuration[objspace.opcodes.CALL_LIKELY_BUILTIN]
general documentation config index command-line overview

# objspace.opcodes.CALL_LIKELY_BUILTIN

Contents

- Basic Option Information
- Description

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:
  - objspace.std.withmultidict must be set to 'True'
  - translation.stackless must be set to 'False'

# 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.