Skip to content

Commit ac011d8

Browse files
luisleo526claude
andcommitted
docs(bench): refresh speed sweep after wave-1 perf pass (2026-06-11)
Full same-session re-time of PineForge / PyneCore / vectorbt / PineTS on the 100-strategy suite. PF median 9.73 ms -> 6.35 ms; median speedup vs PyneCore 104x -> 162x (n=99); vs vectorbt 6.7x -> 10.5x (n=65). aggregate.py prose header updated to the new date/engine version. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 94596bf commit ac011d8

4 files changed

Lines changed: 122 additions & 120 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
99
[![Language](https://img.shields.io/badge/C%2B%2B-17-00599C.svg?logo=cplusplus&logoColor=white)](#)<br>
1010
[![Parity](https://img.shields.io/badge/TV%20parity-245%2F246-brightgreen)](#cross-engine-comparison)
11-
[![Speed](https://img.shields.io/badge/median%20104%C3%97%20vs%20PyneCore%20%2899%20strategies%29-success)](benchmarks/results/speed.md)<br>
11+
[![Speed](https://img.shields.io/badge/median%20162%C3%97%20vs%20PyneCore%20%2899%20strategies%29-success)](benchmarks/results/speed.md)<br>
1212
[![codegen on PyPI](https://img.shields.io/pypi/v/pineforge-codegen?label=codegen&logo=pypi&logoColor=white)](https://pypi.org/project/pineforge-codegen/)
1313
[![MCP server](https://img.shields.io/badge/MCP-server-1565c0?logo=docker&logoColor=white)](https://github.com/pineforge-4pass/pineforge-codegen-mcp)
1414

@@ -114,7 +114,7 @@ for the full tool catalog, request schemas, and env vars (`PINEFORGE_ALLOW_ANYWH
114114
## Why PineForge?
115115

116116
- 🎯 **TradingView-exact.** 245 of 246 reference strategies match TV trade-for-trade. The lone outlier is a stress probe at the 1× margin boundary where TV's broker emulator is non-deterministic — engine is correct. **100 of 100** PineForge excellent vs PyneCore + PineTS on the public three-way benchmark (~167,000 TV trades; PyneCore: 85 of 100; PineTS indicator-only).
117-
- ⚡ **Microsecond-class.** Median **104× faster than PyneCore** across 99 commonly-timed strategies (full 41,307-bar OHLCV via dlopen+run; see [benchmarks/results/speed.md](benchmarks/results/speed.md)). Parameter sweeps load one `.so` and re-run with new inputs — no recompile, no fork, no IPC.
117+
- ⚡ **Microsecond-class.** Median **162× faster than PyneCore** across 99 commonly-timed strategies (full 41,307-bar OHLCV via dlopen+run; see [benchmarks/results/speed.md](benchmarks/results/speed.md)). Parameter sweeps load one `.so` and re-run with new inputs — no recompile, no fork, no IPC.
118118
- 🔒 **Stable C ABI.** 10 functions, 6 POD types, one header (`<pineforge/pineforge.h>`). Append-only across minor versions, `static_assert`-pinned struct layouts, hidden-visibility hygiene. Drop a strategy `.so` in any harness; it just runs.
119119
- 🧪 **Reproducible to the bit.** Deterministic float ordering, deterministic bar magnifier, no internal RNG seeded from time. Two runs with the same inputs produce bit-identical trade lists.
120120
- 🧰 **FFI-friendly.** Call from Python (`ctypes`), Rust (`libloading`), Go (`cgo`), Node, Julia. Worked examples for [pure C](https://cdocs.pineforge.dev/examples_c.html), [Python sweep](https://cdocs.pineforge.dev/examples_python_sweep.html), [Rust](https://cdocs.pineforge.dev/examples_rust.html), [multi-strategy harness](https://cdocs.pineforge.dev/examples_multi.html), and [magnifier A/B](https://cdocs.pineforge.dev/examples_magnifier.html) ship in the docs.
@@ -185,7 +185,7 @@ This repository ships:
185185
- `<pineforge/*.hpp>` — the internal C++ headers (the PineForge transpiler emits against these; not part of the stability guarantee)
186186
- A 39-binary ctest suite (38 C++ + 1 pure-C ABI sanity test) that runs in CI on every commit (~81% line coverage of `src/` measured via `bash scripts/coverage.sh`)
187187
- `**corpus/`** (**public git submodule**) — **246 reference strategies** under a single `corpus/validation/` tree. Each folder ships `strategy.pine`, `generated.cpp`, `tv_trades.csv`, and `engine_trades.csv`. Run `bash scripts/run_corpus.sh` after `git submodule update --init corpus`.
188-
- `[benchmarks/](benchmarks/)` — **three-way engine comparison** (PineForge ↔ [PyneCore](https://github.com/PyneSys/pynecore) ↔ [PineTS](https://github.com/LuxAlgo/PineTS)) on 100 strategies (50 public + 50 promoted corpus probes) and 10 canonical indicators. The harness code and reports live here; **fixtures** (pinned OHLCV, every `strategies/`* folder with TV exports and trade CSVs) ship via the optional **`benchmarks/assets` submodule** — a separate optional **public** submodule (Apache-2.0). With that init’d, `bash benchmarks/run_all.sh` reproduces the headline numbers with zero external API calls. PyneCore Python is official cloud-compiler output (no hand-ports). Headline: PineForge hits canonical *excellent* tier on **50/50** strategies (first 50) vs PyneCore’s 47/50; on the expanded **100-strategy suite (~167,000 TV trades verified)**, PineForge holds **100/100 excellent** vs PyneCore’s 85/100. Median speedup: 104× vs PyneCore across 99 commonly-timed strategies.
188+
- `[benchmarks/](benchmarks/)` — **three-way engine comparison** (PineForge ↔ [PyneCore](https://github.com/PyneSys/pynecore) ↔ [PineTS](https://github.com/LuxAlgo/PineTS)) on 100 strategies (50 public + 50 promoted corpus probes) and 10 canonical indicators. The harness code and reports live here; **fixtures** (pinned OHLCV, every `strategies/`* folder with TV exports and trade CSVs) ship via the optional **`benchmarks/assets` submodule** — a separate optional **public** submodule (Apache-2.0). With that init’d, `bash benchmarks/run_all.sh` reproduces the headline numbers with zero external API calls. PyneCore Python is official cloud-compiler output (no hand-ports). Headline: PineForge hits canonical *excellent* tier on **50/50** strategies (first 50) vs PyneCore’s 47/50; on the expanded **100-strategy suite (~167,000 TV trades verified)**, PineForge holds **100/100 excellent** vs PyneCore’s 85/100. Median speedup: 162× vs PyneCore across 99 commonly-timed strategies.
189189

190190
## Coverage
191191

@@ -449,7 +449,7 @@ Current standings (canonical align-then-trim window, 4-dimension diff vs TV):
449449

450450
The 15 PyneCore-only outliers from excellent involve `strategy.exit(stop=…, limit=…)` brackets, `trail_*` exits, `strategy.close(qty_percent=…)` partial exits, and bar-magnifier paths — categories where PyneCore's broker emulator differs from TV and PineForge does not. See [`benchmarks/results/summary.md`](benchmarks/results/summary.md) for the per-strategy table and methodology.
451451

452-
Last refresh: **2026-05-26** against engine v0.6.0, PyneCore 6.4.6, PineTS 0.9.16. Per-strategy speed table at [`benchmarks/results/speed.md`](benchmarks/results/speed.md) — median **104× faster than PyneCore** on 99 commonly-timed strategies.
452+
Last refresh: **2026-06-11** against engine v0.9.0 + core-improvements-wave01, PyneCore 6.4.6, PineTS 0.9.16. Per-strategy speed table at [`benchmarks/results/speed.md`](benchmarks/results/speed.md) — median **162× faster than PyneCore** on 99 commonly-timed strategies.
453453

454454
## Status
455455

‎benchmarks/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Apples-to-apples comparison of **PineForge** against two open-source PineScript
77

88
## Headline
99

10-
Last refresh: **2026-05-26**. Engine v0.6.0, PyneCore 6.4.6, PineTS 0.9.16.
10+
Last refresh: **2026-06-11** (speed sweep; engine v0.9.0 + core-improvements-wave01). Parity table from 2026-05-26 (engine v0.6.0). PyneCore 6.4.6, PineTS 0.9.16.
1111

1212
**Scale:** 100 strategies × ~167,000 TV trades verified.
1313

@@ -20,7 +20,7 @@ Last refresh: **2026-05-26**. Engine v0.6.0, PyneCore 6.4.6, PineTS 0.9.16.
2020
| 🟡 moderate | 0 / 100 | 10 / 100 | — |
2121
| 🟠 weak | 0 / 100 | 3 / 100 | — |
2222

23-
PineForge hits canonical *excellent* tier on **100 of 100** strategies (was 48/50 in 2025-05). Median speed: **119× faster than PyneCore** across 99 commonly-timed strategies — see [`results/speed.md`](results/speed.md). Per-strategy detail: [`results/summary.md`](results/summary.md).
23+
PineForge hits canonical *excellent* tier on **100 of 100** strategies (was 48/50 in 2025-05). Median speed: **162× faster than PyneCore** across 99 commonly-timed strategies (as of 2026-06-11) — see [`results/speed.md`](results/speed.md). Per-strategy detail: [`results/summary.md`](results/summary.md).
2424

2525
## Reproducing
2626

0 commit comments

Comments
 (0)