Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Quantitative Finance · Glossário

O que é Interpreter overhead?

Definition 8.1 Research, Data and Risk Platforms · Capítulo 8 — Python at Scale

The interpreter overhead of an operation is the work the Python interpreter does around the arithmetic itself: decoding the bytecode, looking up names and attributes, checking types, creating and destroying the objects that hold intermediate values, and counting references. For a scalar operation it is tens to hundreds of times the cost of the arithmetic.

The cost per event of one signal (the exponentially weighted average of signed volume) computed four ways on tick-store records: a Python loop over the mapped records, a Python loop over lists, one array expression, and the same expression streamed in chunks of 65 536 events. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, one thread, machine otherwise idle. Data: bench_pyscale.py.
Figure 8.1. The cost per event of one signal (the exponentially weighted average of signed volume) computed four ways on tick-store records: a Python loop over the mapped records, a Python loop over lists, one array expression, and the same expression streamed in chunks of 65 536 events. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, one thread, machine otherwise idle. Data: bench_pyscale.py.
Ler no capítulo →