From e0667d37f9600828007462e2db652f7839241e35 Mon Sep 17 00:00:00 2001 From: Dave Hrycyszyn Date: Thu, 30 May 2024 14:15:37 +0100 Subject: [PATCH] Fixed some typos in the bft-json-crdt crate readme. --- crates/bft-json-crdt/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bft-json-crdt/README.md b/crates/bft-json-crdt/README.md index 4c1eb3f..29e1fe7 100644 --- a/crates/bft-json-crdt/README.md +++ b/crates/bft-json-crdt/README.md @@ -13,9 +13,9 @@ Unlike most other CRDT implementations, I leave out many performance optimizatio Check out the [accompanying blog post for this project!](https://jzhao.xyz/posts/bft-json-crdt) ## Benchmarks -Altough this implementation does not optimize for performance, it still nonetheless performs quite well. +Although this implementation does not optimize for performance, it still nonetheless performs quite well. -Benchmarking happened on a 2019 Macbook Pro with a 2.6GHz i7. +Benchmarking happened on a 2019 MacBook Pro with a 2.6GHz i7. Numbers are compared to Automerge which report their performance benchmarks [here](https://github.com/automerge/automerge-perf) | # Ops | Raw String (JS) | Ours (basic) | Ours (BFT) | Automerge (JS) | Automerge (Rust) | @@ -38,7 +38,7 @@ This is mostly a learning/instructional project but there are a few places where 1. This is backed by `std::Vec` which isn't great for random insert. Replace with a B-tree or something that provides better insert and find performance 1. [Diamond Types](https://github.com/josephg/diamond-types) and [Automerge (Rust)](https://github.com/automerge/automerge-rs) use a B-tree 2. Yjs is backed by a doubly linked-list and caches last ~5-10 accessed locations (assumes that most edits happen sequentially; seeks are rare) - 3. (funnily enough, main peformance hit is dominated by find and not insert, see [this flamegraph](./flamegraphs/flamegraph_unoptimized.svg)) + 3. (funnily enough, main performance hit is dominated by find and not insert, see [this flamegraph](./flamegraphs/flamegraph_unoptimized.svg)) 2. Avoid calling `find` so many times. A few Automerge optimizations that were not implemented 1. Use an index hint (especially for local inserts) 2. Skipping the second `find` operation in `integrate` if sequence number is already larger