mookid / diffr

Yet another diff highlighting tool
MIT License
572 stars 22 forks source link

diff_sequences_kernel_bidirectional: remove step_by() #95

Closed mookid closed 1 year ago

mookid commented 1 year ago

Profiling reveals that using step_by() surprisingly has a performance impact: image That's counter intuitive, but this might be due to https://doc.rust-lang.org/src/core/iter/adapters/step_by.rs.html being a complicated way of doing something that we really want to be simple.

Falling back to the simplest possible code, we get the following profile: image which does not have the perf bug.

comparison of runtimes: