@sovereignbase/convergent-replicated-list 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -313,30 +313,59 @@ npm run bench
313
313
 
314
314
  Last measured on Node `v22.14.0` (`win32 x64`):
315
315
 
316
- | group | scenario | n | ops | ms | ms/op | ops/sec |
317
- | ------- | ------------------------------------- | ----: | --: | -------: | ----: | --------: |
318
- | `crud` | `create / hydrate snapshot` | 5,000 | 250 | 6,463.06 | 25.85 | 38.68 |
319
- | `crud` | `read / random indexed reads` | 5,000 | 250 | 11.67 | 0.05 | 21,428.33 |
320
- | `crud` | `update / append after tail` | 5,000 | 250 | 4.48 | 0.02 | 55,760.01 |
321
- | `crud` | `update / insert before middle` | 5,000 | 250 | 32.09 | 0.13 | 7,790.39 |
322
- | `crud` | `update / overwrite random` | 5,000 | 250 | 14.57 | 0.06 | 17,157.49 |
323
- | `crud` | `delete / single deletes from middle` | 5,000 | 250 | 14.46 | 0.06 | 17,289.91 |
324
- | `crud` | `delete / range deletes` | 5,000 | 250 | 5.72 | 0.02 | 43,702.47 |
325
- | `mags` | `snapshot` | 5,000 | 250 | 4,393.99 | 17.58 | 56.90 |
326
- | `mags` | `acknowledge` | 5,000 | 250 | 24.30 | 0.10 | 10,288.24 |
327
- | `mags` | `garbage collect` | 5,000 | 250 | 92.76 | 0.37 | 2,695.00 |
328
- | `mags` | `merge ordered deltas` | 5,000 | 250 | 10.33 | 0.04 | 24,202.06 |
329
- | `mags` | `merge shuffled gossip` | 5,000 | 250 | 357.05 | 1.43 | 700.19 |
330
- | `class` | `constructor / hydrate snapshot` | 5,000 | 250 | 7,271.66 | 29.09 | 34.38 |
331
- | `class` | `append after tail` | 5,000 | 250 | 5.34 | 0.02 | 46,819.99 |
332
- | `class` | `prepend before middle` | 5,000 | 250 | 13.33 | 0.05 | 18,756.10 |
333
- | `class` | `remove from middle` | 5,000 | 250 | 4.35 | 0.02 | 57,528.13 |
334
- | `class` | `find near tail` | 5,000 | 250 | 6,267.89 | 25.07 | 39.89 |
335
- | `class` | `snapshot` | 5,000 | 250 | 4,904.97 | 19.62 | 50.97 |
336
- | `class` | `acknowledge` | 5,000 | 250 | 29.89 | 0.12 | 8,362.99 |
337
- | `class` | `garbage collect` | 5,000 | 250 | 108.71 | 0.43 | 2,299.65 |
338
- | `class` | `merge ordered deltas` | 5,000 | 250 | 6.13 | 0.02 | 40,753.78 |
339
- | `class` | `merge shuffled gossip` | 5,000 | 250 | 400.01 | 1.60 | 624.98 |
316
+ | group | scenario | n | ops | crlist ms | crlist ms/op | crlist ops/sec | yjs ms/op | yjs ops/sec | json-joy ms/op | json-joy ops/sec | automerge ms/op | automerge ops/sec | winner |
317
+ | ----- | ----------------------------------- | ----: | --: | --------: | -----------: | -------------: | --------: | ----------: | -------------: | ---------------: | --------------: | ----------------: | --------- |
318
+ | crud | create / hydrate snapshot | 5,000 | 250 | 2,096.39 | 8.39 | 119.25 | 15.07 | 66.34 | 19.3 | 51.82 | 232.99 | 4.29 | crlist |
319
+ | crud | read / random indexed reads | 5,000 | 250 | 0.35 | 0 | 712,047.85 | 0 | 213,949.51 | 0.01 | 72,573.15 | 0 | 1,487,209.99 | automerge |
320
+ | crud | update / append after tail | 5,000 | 250 | 3.75 | 0.01 | 66,712.92 | 0.04 | 26,447.75 | 0.03 | 34,200.66 | 2.79 | 358 | crlist |
321
+ | crud | update / insert before middle | 5,000 | 250 | 3.97 | 0.02 | 62,962.78 | 0.02 | 47,542.98 | 0.02 | 59,963.54 | 2.77 | 360.61 | crlist |
322
+ | crud | update / insert at head | 5,000 | 250 | 1.53 | 0.01 | 163,302.63 | 0.01 | 77,939.89 | 0.02 | 51,651.83 | 2.58 | 387.17 | crlist |
323
+ | crud | update / overwrite random | 5,000 | 250 | 3.77 | 0.02 | 66,267.3 | 0.07 | 14,168.64 | 0.05 | 19,413.25 | 2.91 | 343.26 | crlist |
324
+ | crud | delete / single deletes from middle | 5,000 | 250 | 1.94 | 0.01 | 129,098.89 | 0.03 | 31,265.24 | 0.13 | 7,665.23 | 0.42 | 2,369.86 | crlist |
325
+ | crud | delete / range deletes | 5,000 | 250 | 5.19 | 0.02 | 48,199.28 | 0.04 | 24,172.81 | 0.25 | 3,945.2 | 0.77 | 1,295.13 | crlist |
326
+ | mags | snapshot | 5,000 | 250 | 65.59 | 0.26 | 3,811.53 | 8.41 | 118.88 | 14.09 | 70.97 | 19.99 | 50.02 | crlist |
327
+ | mags | acknowledge | 5,000 | 250 | 76.25 | 0.31 | 3,278.61 | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
328
+ | mags | garbage collect | 5,000 | 250 | 164.23 | 0.66 | 1,522.22 | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
329
+ | mags | merge ordered deltas | 5,000 | 250 | 4.13 | 0.02 | 60,460.95 | 0.06 | 17,959 | 0.02 | 58,147.65 | 4.68 | 213.68 | crlist |
330
+ | mags | merge shuffled gossip | 5,000 | 250 | 478.37 | 1.91 | 522.61 | 0.64 | 1,555.98 | 0.09 | 11,595.98 | 0.41 | 2,456.81 | json-joy |
331
+ | class | constructor / hydrate snapshot | 5,000 | 250 | 1,886.2 | 7.54 | 132.54 | 12.85 | 77.8 | 18.34 | 54.51 | 211.32 | 4.73 | crlist |
332
+ | class | append after tail | 5,000 | 250 | 3.09 | 0.01 | 80,992.65 | 0.02 | 52,369.18 | 0.02 | 53,936.27 | 2.09 | 479.59 | crlist |
333
+ | class | prepend before middle | 5,000 | 250 | 7.79 | 0.03 | 32,077.6 | 0.01 | 81,163.56 | 0.01 | 80,744.14 | 2.68 | 372.46 | yjs |
334
+ | class | remove from middle | 5,000 | 250 | 1.82 | 0.01 | 137,287.2 | 0.03 | 37,143.24 | 0.03 | 35,865.43 | 0.57 | 1,761.16 | crlist |
335
+ | class | find near tail | 5,000 | 250 | 33.64 | 0.13 | 7,431.54 | 0.44 | 2,276.89 | 5.13 | 195.02 | 0.03 | 38,407.18 | automerge |
336
+ | class | snapshot | 5,000 | 250 | 83.09 | 0.33 | 3,008.93 | 7.99 | 125.19 | 14.86 | 67.28 | 19.63 | 50.93 | crlist |
337
+ | class | acknowledge | 5,000 | 250 | 46.72 | 0.19 | 5,351.54 | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
338
+ | class | garbage collect | 5,000 | 250 | 156.68 | 0.63 | 1,595.56 | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
339
+ | class | merge ordered deltas | 5,000 | 250 | 2.43 | 0.01 | 102,720.03 | 0.04 | 24,436.26 | 0.01 | 79,953.95 | 4.08 | 244.99 | crlist |
340
+ | class | merge shuffled gossip | 5,000 | 250 | 265.96 | 1.06 | 940 | 0.72 | 1,384.5 | 0.01 | 73,120.8 | 0.38 | 2,648.01 | json-joy |
341
+
342
+ |
343
+
344
+ These benchmarks compare the work a JavaScript consumer asks each library to do:
345
+ hydrate state, read indexed values, mutate list position, emit or apply deltas,
346
+ and materialize snapshots. CRList is strongest where its live linked projection
347
+ and index cache can be updated incrementally, especially local CRUD, snapshot
348
+ hydration, snapshots, and ordered append deltas.
349
+
350
+ The shuffled-gossip costs more than
351
+ json-joy because CRList immediately maintains a JS live projection and returns
352
+ index-keyed change patches from every merge.
353
+
354
+ json-joy's benchmark path applies compact JSON CRDT patches directly to its
355
+ model, so shuffled patch application is extremely cheap in this scenario. That
356
+ does not prove a weaker convergence model by itself, but it is a different
357
+ tradeoff from CRList's immediate event/change surface.
358
+
359
+ Yjs integrates updates
360
+ into a mature struct store with pending update/delete-set handling, which keeps
361
+ out-of-order gossip relatively cheap.
362
+
363
+ Automerge delegates change application and
364
+ indexed reads to its WASM-backed document store and lazy proxies, explaining its
365
+ very fast random reads and `find` path; its local writes are slower here because
366
+ each write goes through immutable document changes and change generation.
367
+
368
+ Analysis made using ChatGPT-5.5.
340
369
 
341
370
  ## License
342
371