Exceptional performance
JavaScript/WASM performance
| Function | Sequence length | Timed Sequencer workload | Sequencer ops/sec | Diamond Types ops/sec | Sequencer calls | Diamond Types calls | Sequencer avg µs/op | Diamond Types avg µs/op | Sequencer RME | Diamond Types RME |
|---|---|---|---|---|---|---|---|---|---|---|
__create | 100 | Hydrate the retained Reel | 53,359 | 31,036 | 256 | 256 | 18.741 | 32.221 | ±15.10% | ±4.57% |
__read | 100 | Read a rotating visible index | 10,493,179 | 213,995 | 131,072 | 256 | 0.09530 | 4.673 | ±4.92% | ±18.45% |
__length | 100 | Read the visible length | 36,429,872 | 20,699,648 | 131,072 | 131,072 | 0.02745 | 0.04831 | ±5.51% | ±4.42% |
__recover | 100 | Recover all retained values | 392,927 | 222,668 | 256 | 256 | 2.545 | 4.491 | ±1.95% | ±56.98% |
__update | 100 | Insert one Frame at the midpoint | 163,532 | 309,406 | 256 | 256 | 6.115 | 3.232 | ±10.45% | ±9.03% |
__delete | 100 | Soft-delete one midpoint Frame | 259,538 | 290,698 | 256 | 256 | 3.853 | 3.440 | ±11.08% | ±15.79% |
__merge | 100 | Merge one new midpoint Frame | 116,904 | 56,117 | 256 | 256 | 8.554 | 17.820 | ±33.51% | ±21.39% |
__acknowledge | 100 | Acknowledge materialized Realm progress | 6,729,475 | 1,395,089 | 4,096 | 4,096 | 0.1486 | 0.7168 | ±4.23% | ±7.00% |
__garbageCollect | 100 | Release one soft-deleted Frame | 270,856 | — | 256 | — | 3.692 | — | ±19.72% | — |
__snapshot | 100 | Snapshot complete retained state | 255,558 | 73,779 | 256 | 256 | 3.913 | 13.554 | ±19.95% | ±3.56% |
__create | 1,000 | Hydrate the retained Reel | 79,853 | 39,769 | 128 | 128 | 12.523 | 25.145 | ±5.75% | ±6.84% |
__read | 1,000 | Read a rotating visible index | 9,861,933 | 434,972 | 65,536 | 128 | 0.1014 | 2.299 | ±11.97% | ±5.07% |
__length | 1,000 | Read the visible length | 19,988,007 | 26,567,481 | 65,536 | 65,536 | 0.05003 | 0.03764 | ±11.12% | ±8.72% |
__recover | 1,000 | Recover all retained values | 164,663 | 302,755 | 128 | 128 | 6.073 | 3.303 | ±13.30% | ±3.86% |
__update | 1,000 | Insert one Frame at the midpoint | 111,919 | 48,940 | 128 | 128 | 8.935 | 20.433 | ±11.75% | ±9.17% |
__delete | 1,000 | Soft-delete one midpoint Frame | 302,663 | 93,853 | 128 | 128 | 3.304 | 10.655 | ±13.86% | ±5.49% |
__merge | 1,000 | Merge one new midpoint Frame | 252,589 | 37,518 | 128 | 128 | 3.959 | 26.654 | ±9.56% | ±9.98% |
__acknowledge | 1,000 | Acknowledge materialized Realm progress | 2,948,983 | 1,162,520 | 2,048 | 2,048 | 0.3391 | 0.8602 | ±3.71% | ±5.96% |
__garbageCollect | 1,000 | Release one soft-deleted Frame | 527,704 | — | 128 | — | 1.895 | — | ±8.92% | — |
__snapshot | 1,000 | Snapshot complete retained state | 156,715 | 54,864 | 128 | 128 | 6.381 | 18.227 | ±16.82% | ±4.00% |
__create | 10,000 | Hydrate the retained Reel | 2,573 | 17,225 | 64 | 64 | 388.702 | 58.055 | ±66.53% | ±21.46% |
__read | 10,000 | Read a rotating visible index | 5,020,080 | 103,040 | 32,768 | 64 | 0.1992 | 9.705 | ±9.58% | ±21.99% |
__length | 10,000 | Read the visible length | 16,350,556 | 12,603,983 | 32,768 | 32,768 | 0.06116 | 0.07934 | ±15.26% | ±16.01% |
__recover | 10,000 | Recover all retained values | 16,344 | 106,826 | 64 | 64 | 61.183 | 9.361 | ±17.86% | ±26.31% |
__update | 10,000 | Insert one Frame at the midpoint | 38,438 | 7,982 | 64 | 64 | 26.016 | 125.289 | ±39.17% | ±82.21% |
__delete | 10,000 | Soft-delete one midpoint Frame | 172,891 | 13,819 | 64 | 64 | 5.784 | 72.364 | ±40.84% | ±11.56% |
__merge | 10,000 | Merge one new midpoint Frame | 46,100 | 10,454 | 64 | 64 | 21.692 | 95.656 | ±55.93% | ±20.84% |
__acknowledge | 10,000 | Acknowledge materialized Realm progress | 3,225,806 | 968,054 | 1,024 | 1,024 | 0.3100 | 1.033 | ±11.50% | ±14.23% |
__garbageCollect | 10,000 | Release one soft-deleted Frame | 46,893 | — | 64 | — | 21.325 | — | ±107.46% | — |
__snapshot | 10,000 | Snapshot complete retained state | 43,301 | 22,213 | 64 | 64 | 23.094 | 45.019 | ±48.42% | ±37.33% |
__create | 100,000 | Hydrate the retained Reel | 142 | 1,438 | 16 | 16 | 7,056.825 | 695.625 | ±30.00% | ±56.66% |
__read | 100,000 | Read a rotating visible index | 4,083,299 | 10,018 | 8,192 | 16 | 0.2449 | 99.819 | ±15.38% | ±31.71% |
__length | 100,000 | Read the visible length | 12,274,457 | 6,877,579 | 8,192 | 8,192 | 0.08147 | 0.1454 | ±6.06% | ±26.14% |
__recover | 100,000 | Recover all retained values | 878 | 17,337 | 16 | 16 | 1,138.744 | 57.681 | ±32.91% | ±14.07% |
__update | 100,000 | Insert one Frame at the midpoint | 98,580 | 1,812 | 16 | 16 | 10.144 | 551.969 | ±25.58% | ±12.35% |
__delete | 100,000 | Soft-delete one midpoint Frame | 190,694 | 1,930 | 16 | 16 | 5.244 | 518.012 | ±20.29% | ±8.73% |
__merge | 100,000 | Merge one new midpoint Frame | 89,485 | 1,372 | 16 | 16 | 11.175 | 728.825 | ±55.60% | ±21.61% |
__acknowledge | 100,000 | Acknowledge materialized Realm progress | 4,182,350 | 1,050,089 | 256 | 256 | 0.2391 | 0.9523 | ±5.96% | ±16.26% |
__garbageCollect | 100,000 | Release one soft-deleted Frame | 320,616 | — | 16 | — | 3.119 | — | ±5.37% | — |
__snapshot | 100,000 | Snapshot complete retained state | 1,559 | 4,558 | 16 | 16 | 641.431 | 219.381 | ±44.63% | ±29.69% |
__create | 1,000,000 | Hydrate the retained Reel | 18 | 267 | 16 | 16 | 56,965.988 | 3,747.700 | ±14.14% | ±10.55% |
__read | 1,000,000 | Read a rotating visible index | 2,768,549 | 754 | 8,192 | 16 | 0.3612 | 1,327.000 | ±57.49% | ±25.38% |
__length | 1,000,000 | Read the visible length | 22,381,379 | 8,496,177 | 8,192 | 8,192 | 0.04468 | 0.1177 | ±7.55% | ±2.88% |
__recover | 1,000,000 | Recover all retained values | 58 | 897 | 16 | 16 | 17,147.762 | 1,115.063 | ±39.12% | ±24.01% |
__update | 1,000,000 | Insert one Frame at the midpoint | 99,443 | 246 | 16 | 16 | 10.056 | 4,072.900 | ±8.11% | ±9.25% |
__delete | 1,000,000 | Soft-delete one midpoint Frame | 108,401 | 269 | 16 | 16 | 9.225 | 3,723.856 | ±14.51% | ±11.97% |
__merge | 1,000,000 | Merge one new midpoint Frame | 59,018 | 262 | 16 | 16 | 16.944 | 3,811.575 | ±31.17% | ±14.74% |
__acknowledge | 1,000,000 | Acknowledge materialized Realm progress | 6,385,696 | 1,419,849 | 256 | 256 | 0.1566 | 0.7043 | ±15.48% | ±7.32% |
__garbageCollect | 1,000,000 | Release one soft-deleted Frame | 235,627 | — | 16 | — | 4.244 | — | ±7.87% | — |
__snapshot | 1,000,000 | Snapshot complete retained state | 156 | 912 | 16 | 16 | 6,398.656 | 1,096.031 | ±39.13% | ±13.20% |
Diamond Types 1.0.2: “The world's fastest CRDT. WIP.” Both implementations use one-character strings, the same logical Sequence lengths, midpoint mutations, warm-up sample counts, and measured sample counts. Each uses its public native snapshot and patch format. Diamond Types has no direct indexed-read API, so its read result calls get() before selecting one character; its clean-state get() is the closest recovery equivalent. Diamond Types exposes no public garbage-collection operation, shown as —.
Methodology: avg µs/op is the arithmetic mean of the measured per-call latencies. Ops/sec is its reciprocal; displayed values are rounded as one reciprocal pair. Setup, cleanup, and warmup calls are excluded. Mutating operations receive a fresh prepared state for every sample; read-only operations use stable state. Batch sizes only amortize timer overhead and are reported through call counts. These Node.js results do not represent browser runtimes.
Small bundle size
| Format | Raw | Minified | Minified + gzip |
|---|---|---|---|
| ESM | 91.3 kB | 53.8 kB | 19.0 kB |
| CommonJS | 91.6 kB | 56.3 kB | 19.3 kB |
Compact data model
| Reel workload | Average bytes per operation | MessagePack | MessagePack + gzip | Gzip reduction |
|---|---|---|---|---|
| 1,000 one-frame updates | 39.6 B | 39.6 kB | 7.8 kB | 80.2% |
| 1,000 one-frame masks | 36.0 B | 36.0 kB | 5.1 kB | 85.9% |
| Snapshot containing 1,000 one-frame strips | 39.6 B | 39.6 kB | 7.8 kB | 80.2% |
Reel sizes use MessagePack and gzip level 9 over the complete 1,000-operation collection. Gzip reduction is measured against the MessagePack payload.