New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal: replace difference with similar #51
internal: replace difference with similar #51
Conversation
Codecov Report
@@ Coverage Diff @@
## main #51 +/- ##
==========================================
+ Coverage 96.55% 99.42% +2.87%
==========================================
Files 5 5
Lines 145 174 +29
==========================================
+ Hits 140 173 +33
+ Misses 5 1 -4
Continue to review full report at Codecov.
|
@mitsuhiko I've benchmarked this branch vs I'm going to continue investigating, but this means I'm unlikely to merge this implementation as is. |
Closing for now as obsolete from #52, happy to revisit if the performance can be improved. |
Thanks for the heads up. I will add some benchmarks to figure out what’s going on. |
@tommilligan I'm not sure yet why myers performs so bad but I added a simple LCS implementation to see how it performs. I noticed two things from this:
let diff = TextDiff::configure()
.algorithm(Algorithm::Lcs)
.diff_lines(left, right); Both of those together are similar in performance to the current main version of rust-pretty-assertions. Sadly I'm on a laptop so I can't do stable benchmarks here. It does say it outperforms diff but I can't be sure. I also swapped out Myer's for a better implementation now that performs significantly better. |
Pushed out a 1.2.0 with the changes. And thanks for the box fix. |
See #44
Major rewrite to remove the dependency on
difference
, which is unmaintained.