Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 67 additions & 17 deletions generated/benchmarks/QUERY-BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Latencies are median over 5 runs. Hub target = most-connected node.

| Version | Engine | fnDeps d1 | fnDeps d3 | fnDeps d5 | fnImpact d1 | fnImpact d3 | fnImpact d5 | diffImpact |
|---------|--------|----------:|----------:|----------:|------------:|------------:|------------:|-----------:|
| 3.3.0 | native | 1.4 ↑56% | 1.3 ↑44% | 1.3 ↑44% | 1.3 ↑44% | 1.3 ↑44% | 1.3 ↑44% | 8.8ms ↑28% |
| 3.3.0 | wasm | 1.3 ↑30% | 1.3 ↑30% | 1.2 ↑33% | 1.3 ↑44% | 1.3 ↑44% | 1.3 ↑44% | 8.5ms ↑39% |
Comment on lines +8 to +9
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Significant query latency regression in 3.3.0

All query latencies increased substantially vs 3.1.4 and the broader 3.x baseline:

  • fnDeps / fnImpact (native): +44–56% (0.9ms → 1.3–1.4ms)
  • diffImpact (native): +28% (6.9ms → 8.8ms)
  • fnDeps / fnImpact (WASM): +30–44% (0.9–1ms → 1.2–1.3ms)
  • diffImpact (WASM): +39% (6.1ms → 8.5ms)

Part of this may be attributable to the hub target changing from src/db.jssrc/types.ts (a more connected node in the evolved codebase). However, the magnitude of the regression — particularly in diffImpact which is not hub-dependent — suggests a real performance change worth investigating before shipping 3.3.0.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latency regression is addressed in #528 — gating implementors lookups and caching loadConfig() brought query latencies back down.

| 3.1.4 | native | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 6.9ms ↓17% |
| 3.1.4 | wasm | 1 ↑11% | 1 ↑25% | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 6.1ms ↓22% |
| 3.1.3 | native | 0.8 ~ | 0.8 ~ | 0.8 ~ | 0.8 ~ | 0.8 ~ | 0.8 ~ | 8.3ms ↓2% |
Expand All @@ -30,42 +32,90 @@ Latencies are median over 5 runs. Hub target = most-connected node.

### Latest results

**Version:** 3.1.4 | **Date:** 2026-03-16
**Version:** 3.3.0 | **Date:** 2026-03-19

#### Native (Rust)

**Targets:** hub=`src/db.js`, mid=`previous`, leaf=`docs`
**Targets:** hub=`src/types.ts`, mid=`db`, leaf=`docs`

| Metric | Value |
|--------|------:|
| fnDeps depth 1 | 0.9ms |
| fnDeps depth 3 | 0.9ms |
| fnDeps depth 5 | 0.9ms |
| fnImpact depth 1 | 0.9ms |
| fnImpact depth 3 | 0.9ms |
| fnImpact depth 5 | 0.9ms |
| diffImpact latency | 6.9ms |
| fnDeps depth 1 | 1.4ms |
| fnDeps depth 3 | 1.3ms |
| fnDeps depth 5 | 1.3ms |
| fnImpact depth 1 | 1.3ms |
| fnImpact depth 3 | 1.3ms |
| fnImpact depth 5 | 1.3ms |
| diffImpact latency | 8.8ms |
| diffImpact affected functions | 0 |
| diffImpact affected files | 0 |

#### WASM

**Targets:** hub=`src/db.js`, mid=`previous`, leaf=`docs`
**Targets:** hub=`src/types.ts`, mid=`functionNodeId`, leaf=`docs`
Comment on lines +39 to +55
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Inconsistent mid benchmark targets between engines

The mid target differs between the Native and WASM runs for 3.3.0: Native uses mid=db while WASM uses mid=functionNodeId. All prior versions used the same mid symbol for both engines in the same version. This inconsistency makes it impossible to do a fair apples-to-apples engine comparison for 3.3.0 and may indicate a fluke in the automated benchmark selection logic (e.g. the most-connected mid-tier symbol resolving differently per engine).

If this is intentional (e.g. the "mid" node is independently computed per engine), it should be called out in the benchmark methodology notes at the top of the file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #527 — target propagation via TARGETS_ENV_KEY ensures both engines benchmark the same symbols. These benchmark PRs should be re-run after #527 merges.


| Metric | Value |
|--------|------:|
| fnDeps depth 1 | 1ms |
| fnDeps depth 3 | 1ms |
| fnDeps depth 5 | 0.9ms |
| fnImpact depth 1 | 0.9ms |
| fnImpact depth 3 | 0.9ms |
| fnImpact depth 5 | 0.9ms |
| diffImpact latency | 6.1ms |
| fnDeps depth 1 | 1.3ms |
| fnDeps depth 3 | 1.3ms |
| fnDeps depth 5 | 1.2ms |
| fnImpact depth 1 | 1.3ms |
| fnImpact depth 3 | 1.3ms |
| fnImpact depth 5 | 1.3ms |
| diffImpact latency | 8.5ms |
| diffImpact affected functions | 0 |
| diffImpact affected files | 0 |

<!-- QUERY_BENCHMARK_DATA
[
{
"version": "3.3.0",
"date": "2026-03-19",
"wasm": {
"targets": {
"hub": "src/types.ts",
"mid": "functionNodeId",
"leaf": "docs"
},
"fnDeps": {
"depth1Ms": 1.3,
"depth3Ms": 1.3,
"depth5Ms": 1.2
},
"fnImpact": {
"depth1Ms": 1.3,
"depth3Ms": 1.3,
"depth5Ms": 1.3
},
"diffImpact": {
"latencyMs": 8.5,
"affectedFunctions": 0,
"affectedFiles": 0
}
},
"native": {
"targets": {
"hub": "src/types.ts",
"mid": "db",
"leaf": "docs"
},
"fnDeps": {
"depth1Ms": 1.4,
"depth3Ms": 1.3,
"depth5Ms": 1.3
},
"fnImpact": {
"depth1Ms": 1.3,
"depth3Ms": 1.3,
"depth5Ms": 1.3
},
"diffImpact": {
"latencyMs": 8.8,
"affectedFunctions": 0,
"affectedFiles": 0
}
}
},
{
"version": "3.1.4",
"date": "2026-03-16",
Expand Down
Loading