Skip to content

feat(bench): H13 phase 2 — comparative streaming hypothesis - #23

Merged
blove merged 1 commit into
mainfrom
feat/h13-comparative
May 1, 2026
Merged

blove merged 1 commit into
mainfrom
feat/h13-comparative

Conversation

@blove

@blove blove commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Promotes H13 from absolute-only (PR #15) to a comparative claim, mirroring H1's structure. All four bench adapters wire their idiomatic streaming pattern:

  • Pretable: stream-adapter batcher → `grid.applyTransaction` (RAF-batched)
  • Grid Alpha: `gridApi.applyTransaction({ update })` (native)
  • GridGamma X Community: `apiRef.updateRows([row])` looped per patch — Community caps `updateRows` to one row per call; batched updates are a Pro/Premium feature. Faithful to the idiomatic Community API.
  • GridBeta Virtual: `setRows` merge — rows lifted to React state, every batch triggers reconciliation. Inherent cost of "primitive virtualization + React state."

H13 evaluator structure

  1. Pretable must clear absolute thresholds (frame p95 ≤ 16 ms, 0 long tasks)
  2. Frame p95 must be within 10% of the best measured comparator
  3. At least one comparator must fail the absolute thresholds (uniqueness)

Without comparator data → `directional`. All comparators clear absolutes → `directional`. Pretable hits parity + uniqueness → `satisfied`.

Real comparative result (Chromium, hypothesis scale, 3 repeats)

Adapter frame p95 long tasks clears absolutes
Pretable 8.9 ms 0 ✓
Grid Alpha 9.0 ms 0 ✓
GridBeta 8.8 ms 0 ✓
GridGamma X Community 100 ms 59 ✗

Pretable parity vs best (GridBeta 8.8 ms): 9 / 8.8 = 1.01 — within 10% band. GridGamma fails absolutes → uniqueness supported → H13 SATISFIED with comparative evidence.

The honest read: Pretable matches the strong comparators (Grid Alpha, GridBeta) and decisively beats the weak one (GridGamma Community). The streaming wedge is real but narrower than a universal "we're 4× faster than every grid" framing — it's specifically "we don't fall apart under streaming the way some grids do."

Side fixes

  • bench-runner: `updates` allowed on all four adapters (was pretable-only)
  • bench-app: wait up to ~1 s for adapter's update API to publish — Grid Alpha fires `onGridReady` several RAFs after mount, was racing past it

Test plan

  • 38 bench-matrix tests (36 baseline + 2 new comparative cases, 1 replaced)
  • bench-runner test updated for all-adapter `updates` support
  • Full workspace tests, typecheck, lint, format clean
  • Real matrix run produces expected H13 `satisfied` with comparative evidence
  • CI green

Promote H13 from absolute-only (PR #15) to a comparative claim. All four
bench adapters now wire their idiomatic streaming pattern:

- Pretable: stream-adapter batcher → grid.applyTransaction (RAF-batched)
- AG Grid: gridApi.applyTransaction({ update }) (native batching)
- MUI X Community: apiRef.updateRows([row]) — looped per patch since
  Community caps updateRows to one row per call (Pro/Premium-only batch
  feature). Faithful to the idiomatic Community API.
- TanStack Virtual: setRows merge — rows lifted to useState, every batch
  triggers a React reconciliation. Inherent cost of "primitive
  virtualization + React state" updates, which is the wedge story.

The H13 evaluator now mirrors H1's structure:
1. Pretable must clear absolute thresholds (frame p95 ≤ 16ms, 0 long tasks)
2. Frame p95 must be within 10% of the best measured comparator
3. At least one comparator must fail the absolute thresholds (uniqueness)

Without comparator data → directional. All comparators clear absolutes →
directional. Pretable beats parity + uniqueness → satisfied.

bench-runner gating updated: `updates` script now allowed for all four
adapters on S5 (was pretable-only). bench-app waits up to ~1s for the
adapter's update API to publish (AG Grid fires onGridReady several RAFs
after mount, was racing past it).

## H13 — comparative result on Chromium, hypothesis scale, 3 repeats

| Adapter | frame p95 | long tasks | clears absolutes |
|---------|-----------|------------|------------------|
| Pretable | 8.9 ms | 0 | yes |
| AG Grid | 9.0 ms | 0 | yes |
| TanStack | 8.8 ms | 0 | yes |
| MUI X (Community) | **100 ms** | **59** | no |

Pretable parity vs best comparator (TanStack 8.8ms): 9/8.8 = 1.01,
within the 10% band. MUI fails the absolute thresholds → uniqueness
claim supported → H13 SATISFIED with comparative evidence.

The honest read: Pretable's idiomatic streaming pattern matches the
strong comparators (AG Grid, TanStack) and decisively beats the weak
one (MUI Community). The streaming wedge is real but narrower than a
universal "we're 4× faster than every grid" framing — it's specifically
"we don't fall apart under streaming the way some grids do."

bench-matrix tests: 36 → 38 (added comparative pass + parity-failing
cases, replaced absolute-only satisfied test with directional-without-
comparator). bench-runner test updated to expect all 4 adapters on
S5/updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@blove
blove merged commit 28acf8e into main May 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant