全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Quantitative Finance · 术语表

什么是 Interpreter overhead?

Definition 8.1 Research, Data and Risk Platforms · 第 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.
在原文中阅读 →