Skip to content

AnubhabB/diff-match-patch-rs-bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diff-match-patch-rs-bench

Benchmarking the crate diff-match-patch-rs against other implementations.

Benchmark

Lang. Library Diff Avg. Patch Avg. Bencher Mode Correct
rust diff_match_patch v0.1.1** 68.108 ms 10.596 ms Criterion -
rust diffmatchpatch v0.0.4*** 66.454 ms - Criterion -
rust dmp v0.2.0 69.019 ms 14.654 ms Criterion -
rust diff-match-patch-rsour 64.66 ms 631.13 µs Criterion Efficient
rust diff-match-patch-rsour 64.68 ms 1.1703 ms Criterion Compat
go go-diff 50.31 ms 135.2 ms go test -
node diff-match-patch 246.90 ms 1.07 ms tinybench -
python diff-match-patch^ 1.01 s 0.25 ms timeit -

Note: Omitting dissimilar from the results, I believe that crate has different goals and a headon benchmark is not fair Results: Avg[197.30] High[197.46] Low[197.19]

** Adds an extra clone to the iterator because the patch_apply method takes mutable refc. to diffs
*** The crate diffmatchpatch v0.0.4 is still a WIP, cound't find the patch_apply method
^ Most JS based crates fail at unicode surrogates, the generated diffs are not compatible with other implementations. The JS based variants with the unicode surrogate fix breaks for implementations in other languages

About

Benchmarking the crate `diff-match-patch-rs` against other implementations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published