alexmacarthur / striff

Real simple string diffing.
MIT License
203 stars 4 forks source link

Make it smaller? #13

Open xem opened 2 years ago

xem commented 2 years ago

Hi,

I read your code and congrats, there are very interesting tricks used here to make your diff algorithm.

I have also worked on diffing a while ago, and found that the most efficient (in term of size and execution speed) seemed to be Myer's diff algorithm: https://blog.robertelder.org/diff-algorithm/

I minified and golfed it and reached a size of 406 bytes (without gzip): http://xem.github.io/miniDiff/

So this is not really an issue, but if you're intersted to make your code shorter, this could be an idea.

Cheers, Max

alexmacarthur commented 1 year ago

This is amazing! Not a priority for me right now, but I'm definitely open to it. Well done.