Today I learnt about a cunning trick used by GNU diff to make Myer's algorithm faster: https://github.com/mitsuhiko/similar/issues/15
If you do an initial pass to find items that only occur on one side, you can discard them before diffing! They'll always be shown as changed.
miniblog.
Related Posts
@janriemer@mastodon.technology Wow, that's a cunning trick. Hash map size remains a bottleneck for my difftastic project, I wonder if I can do something similar.
Cunning trick to ease upgrades in Rust. Each semver upgrade is a distinct type, but a library can depend on an older version of itself and preserve the types!
Some cunning NLP research which has found that really simple statistical models (e.g. does the sentence contain "not"?) is sufficient to answer a good number of text comprehension datasets: https://thegradient.pub/nlps-clever-hans-moment-has-arrived/