# map — benchmark

Workload: 10_000 rows; projection `{id, sum: val + val2}`. Tick rewrites
one row's `val`. Batch streams 1000 such ticks. Generated by
[comparisons/bench/operators/map.bench.ts](../../comparisons/bench/operators/map.bench.ts).

| Library | Setup (ms) | Single (ms) | vs data | Batch 1000 (ms) | vs data |
|---|---:|---:|---:|---:|---:|
| **data** | 4.39 | **0.012** | — | **3.37** | — |
| react | 1.72 | 0.589 | 49.1× | 853.88 | 253× |
| rxjs | 2.09 | 0.684 | 57.0× | 923.44 | 274× |
| svelte-store | 1.89 | 1.17 | 97.5× | 672.24 | 199× |
| preact-signals | 4.27 | 1.56 | 130× | 126.69 | 37.6× |
| solid | 24.36 | 6.81 | 568× | 574.33 | 170× |
| vue-reactivity | 20.57 | 17.47 | 1456× | 1994.22 | 592× |
| mobx | 253.42 | 22.82 | 1902× | 1459.60 | 433× |



crossfilter omitted — no projection primitive (its dimensions project at
access time, which would conflate the bench with sort/walk costs).

data is fastest on both single (81x over rxjs) and batch (55x over
preact-signals).

## How

`map` is a `RowOperator` like `filter` — each BU2 routes only to the
touched row's projection slot. Peers materialize a fresh `rows.map(...)`
on every emit and walk all N rows.

Run `BENCH_OPS=map npm run bench:ops` to refresh.
