my fork of dmp
-rw-r--r--README.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/README.md b/README.md
index 19f7f06..2e4fa59 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,11 @@
This library is a port of the [Diff Match Patch](https://github.com/dmsnell/diff-match-patch) to Rust. The
diff implementation is based on [Myers' diff algorithm](https://neil.fraser.name/writing/diff/myers.pdf).
+# NOT FOR PRODUCTION (YET!)
+
+Please note, this experiment has a fundamental flaw! Working with `&[u8]` if the source and destination libraries both work with `rust` or can represent `String` as `Uint8Array`. Which means, because we are working with `&[u8]` we are losing interoperatibility between libraries or other implementations of DiffMatchPatch.
+
+
## What's different in this implementation?
- Instead of `String` or `Vec<Char>` this library works with `&[u8]` avoiding allocation as much as possible, this in-turn provides significant performance boost [See Benchmarks](#benchmarks)
- The **line diff** speedup follows a slightly more efficient execution path
@@ -10,7 +15,16 @@ diff implementation is based on [Myers' diff algorithm](https://neil.fraser.name
## Benchmarks
Benchmarks are maintained [diff-match-patch-bench repository](https://github.com/AnubhabB/diff-match-patch-rs-bench)
-[TODO] Add benchmarks
+# diff-match-patch-rs-bench
+Benchmarking the crate `diff-match-patch-rs` against other implementations.
+
+## `Diff`
+| Lang. | Library | Avg. (ms) | High (ms) | Low (ms) | Bencher |
+|:-------:|:---------:|:-----------:|:-----------:|:----------:|:---------:|
+| `rust` | [diff_match_patch v0.1.1](https://crates.io/crates/diff_match_patch) | 68.108 | 68.178 | 68.062 | Criterion |
+| `rust` | [diffmatchpatch v0.0.4](https://crates.io/crates/diffmatchpatch) | 66.454 | 66.476 | 66.434 | Criterion |
+| `rust` | [dmp v0.2.0](https://crates.io/crates/dmp) | 69.019 | 66.476 | 68.991 | Criterion |
+| `rust` | [diff-match-patch-rs](https://github.com/AnubhabB/diff-match-patch-rs.git)<sup>our</sup> | 65.457 | 65.484 | 65.433 | Criterion |
## Related projects