mweidner037 / list-positions

Efficient "positions" for lists and text - enabling rich documents and collaboration
https://www.npmjs.com/package/list-positions
MIT License
51 stars 3 forks source link

Benchmark quality #22

Open mweidner037 opened 2 months ago

mweidner037 commented 2 months ago

Bring benchmarks up to paper quality:

mweidner037 commented 2 months ago
mweidner037 commented 2 months ago
scottmessinger commented 1 month ago

It would be great to see the results side by side with the results from other libraries. It seems this library is competitive in regards to speed at cost of storage space. If i’m reading the results correctly, the final document is around 800KB compared to 250KB with automerge or others. Is that right?

mweidner037 commented 1 month ago

@scottmessinger I made a PR on the crdt-benchmarks repo, which will give a side-by-side comparison once it is merged & re-run. For now, here are results from running everything on my machine: table.md

If i’m reading the results correctly, the final document is around 800KB compared to 250KB with automerge or others.

Yes, by default the saved states use a lazy JSON encoding, which is less efficient than the binary encodings used by other libraries. In principle,one could make a JSON-to-protobuf encoding, but for now, I've just been using GZIP.

You can also reduce the JSON size from 800->500KB by using the Text class instead of a List of single characters: https://github.com/mweidner037/list-positions/blob/master/benchmark_results.md#text-direct