Skip to content

PROJECT: QuantEcon benchmarking programme (code performance & execution) #335

Description

@mmcky

Scope

Code benchmarking and execution performance for QuantEcon computational work. This programme is deliberately focused: AI/LLM evaluation benchmarks (e.g. benchmark.translate-zh-cn) are a separate domain and out of scope here (naming conventions for the two families to be settled separately). Early focus is the lecture series — they are user-facing and where implementation choices are most visible — expanding later to library and infrastructure benchmarks.

Motivation

The review thread on QuantEcon/lecture-python.myst#717 (ge_arrow JAX conversion) produced a quantitative evaluation system for deciding whether an acceleration rewrite actually improves a lecture, and demonstrated why our current practice misleads: warm %timeit-style benchmarks showed the JAX version 1.4–4.8× faster, while replaying the lecture's actual call sequence in a fresh process (so compile time counts) showed it ~45× slower. Getting the measurement methodology right changes conversion decisions.

We already have two scoped benchmarking projects — #264 (kernel/backend suite) and #289 (lecture build monitoring) — plus repos created from them. This umbrella issue organises them into one programme with shared methodology, and adds the missing middle layer that #717 surfaced.

Structure — three workstreams

A. Kernel/backend suite — existing, #264. Library-level benchmarks (NumPy / Numba / JAX CPU / JAX GPU / Dask) across problem sizes, producing crossover curves ("GPU wins above size N for operation X"). This is the reference data layer. Repo: benchmarks.

B. Per-lecture implementation evaluation — new, from QuantEcon/lecture-python.myst#717. Given a lecture's actual problem sizes and call pattern, which implementation should it use — and did a conversion PR improve it? Deliverables: the evaluation scripts (being gathered by @xuanguang-li from the #717 thread), a reusable agent skill (working name /eval-py-acceleration) built with him, and the rubric documented in the manual (tracked in QuantEcon/QuantEcon.manual#104). Both the scripts and the skill live in the new QuantEcon/skills repository as a benchmark plugin, so the harness is versioned once and distributed everywhere (see #304 for the marketplace mechanism). This layer consumes workstream A's crossover data. Validation cases: lecture-python.myst#717 and lecture-python.myst#654.

C. Longitudinal monitoring — existing, #289. Per-lecture execution-time tracking across publish-* releases and environment.yml changes, with regression detection (e.g. the annual Anaconda upgrade cycle). Repo: tool-lecture-benchmark.

Shared foundations

Sequencing

  1. Workstream B first (lectures are user-facing): gather the #717 scripts, build and validate the /eval-py-acceleration skill in QuantEcon/skills, document in the manual.
  2. Extract the harness patterns from B to seed the workstream A suite.
  3. Wire workstream C into CI for release/environment regression tracking.

Tasks

  • Attach PROJECT: Performance Benchmarks Suite for Numba, Dask, JAX (CPU/GPU) #264 and Project: Lecture Performance Benchmarking & Monitoring System #289 as sub-issues of this umbrella
  • Scaffold QuantEcon/skills as a Claude Code plugin marketplace with a benchmark plugin (skill + scripts)
  • Workstream B: collect the evaluation scripts from the lecture-python.myst#717 thread into QuantEcon/skills (benchmark plugin)
  • Workstream B: build /eval-py-acceleration and validate against lecture-python.myst#717 and lecture-python.myst#654
  • Workstream B: manual documentation (tracked in QuantEcon/QuantEcon.manual#104)
  • Roll out marketplace auto-install settings (extraKnownMarketplaces + enabledPlugins in checked-in .claude/settings.json) across the lecture repos once the skill stabilises
  • Adopt the as-used measurement standard in a short written note all workstreams reference
  • Define the shared result + environment-descriptor schema (commit, environment hash, runner class, hardware, library versions) — first blocking deliverable: telemetry reports, harness results, and kernel-suite results all write to it (extends Proposal: emit a machine-readable execution_status.json for lecture build/execution status #314; see the telemetry design comment below)
  • Telemetry: post-build per-cell execution report from .jupyter_cache (nbclient already records metadata.execution by default) + PR-diff screening comment on preview builds
  • Prose feature (separable): an {exec-time} role resolving measured cell durations into lecture text (Sphinx extension now, mystmd plugin post-migration)
  • Revisit expansion beyond lectures (QuantEcon.py benchmarks, wasm comparison, runner/cost benchmarking)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions