THE BENCHMARK LAB

Evidence.
Not promises.

Compare zerocopy, Immutable.js Map, and Immer Map across workers. In your browser. On your hardware. With every result checked.

Preparing this demo…

Compare investigation architectures with Immutable.js Lists and native arrays →

01

Set your workload

ShapeString keys → numbersSamples7 per path + 2 warm-upsOperationPublish, attach, read all

This uses CPU and memory. Run it in a foreground tab. All data is generated locally.

02

Read the results

LIVE / LOCAL
Ready for a real result.
zerocopy— ms
Immutable.js Map— ms
Immer Map— ms

No stored scores. Press Run to measure.

Read the method →
THE SMALL PRINT IS THE POINT

What this actually measures.

End-to-end fan-out and reads. Not a pure transfer benchmark. Not a memory benchmark.

Included

Snapshot encoding, sending to all readers, reconstruction or shared attachment, a lookup for every key, and the response. zerocopy reattaches read-only shared views. Immutable.js encodes all entries, structured-clones them, and rebuilds a Map in each reader. Immer structured-clones its Map and freezes each replica.

Excluded

Worker startup and library loading happen before warm-up. Dataset construction happens once, with its own reported timing. It is not included in the comparison bars.

Same job. Checked answers.

All three paths use the same deterministic string keys and numeric values. Each reader reports a checksum. A mismatch fails the run. Measurement order rotates, and the median and interquartile range use all seven samples.

No universal winner

Any path can win. Immer uses produce with Map support and default auto-freezing. All snapshots are built once; every trial publishes a full snapshot. Warm-up does not remove attachment, cloning, reconstruction, or freezing costs. This test does not measure persistent edit history, every value type, or your application's workload.

Type a topic to find a guide.

↓ ↑ to move · Enter to open · Esc to close

Browse documentation →