Closed dmonad closed 9 months ago
Hi @dmonad!
Thanks for diving into this. I've created a PR to fix the implementation #25
However, you can still see some discrepancies with the numbers reported on the website because the website reports benchmark data for the version dated 2023-11-08. Over the past two months, we've done a lot of refactoring and adjustments, the most significant of which is the change in our encoding format https://github.com/loro-dev/loro/pull/219. Additionally, we switched the compilation optimization level (opt-level) for WASM from 3 to 's', which may result in some performance trade-offs for a smaller WASM size. These refactorings will lead to changes in many performance metrics, and we have not yet embarked on more specific optimization work.
I think it's fair to use exportSnapshot
during encoding because Loro's exportSnapshot actually serves a similar purpose to Automerge's save. It efficiently encodes both state and history, so in terms of document size, it's similar to exportUpdates
. Our method is not exporting the internal memory representation; if it were, the document size would likely be much larger.
Thank you for clearing that up!
You are right, it's fair to use exportSnapshot
, since I also do so for Automerge.
I published fresh benchmarking results in the readme. Today I realized how much slower my machine is to current M1's. But maybe that's a good thing, my 7 year old CPU reflects "normal users" much better.
Hi @loro-dev, @zxch3n @Leeeon233,
After looking at the benchmarks at your website, I wanted to reproduce your results. Unfortunately, I can't find your fork of my benchmarking suite in your organization. So I integrated Loro in my benchmarking suite. Please feel free to maintain your benchmarks in this repository!
My benchmark results look very different from what you stated on your website. While you state that
parseTime
andtime
are almost (a lot) smaller than Yjs, I find the exact opposite here. In some cases, Loro seems to have exponential runtime behavior (e.g. in the B2 & B3 benchmarks, bothtime
andparseTime
increase exponentially with N). B4x100 takes several hours to execute, not just mere seconds as you stated.Can you please explain the disparity between these results? Is there some hidden API that I'm supposed to use?
Below, I compiled a table that shows the disparity.
Disparity between benchmark results
Loro Website Benchmarks (extracted January 23, 2024)