diffobj
diffobj copied to clipboard
Fast Diff
Provide a more useful version of ses
that has minimal overhead. Initial implementation could be some way of setting all flags to the minimal effort level on diffChr
.
Merging #84 into this issue. Note that in:
x <- y <- 1:1e6
x[sample(1e6, 100)] <- sample(1e6, 100)
library(diffobj)
system.time(diffChr(x, y))
# user system elapsed
# 47.582 0.267 47.829
system.time(diffChr(x, y, word.diff=FALSE))
# user system elapsed
# 13.566 0.344 13.902
system.time(diffChr(x, y, word.diff=FALSE, ignore.white.space=TRUE))
# user system elapsed
# 13.203 0.585 13.779
system.time(diffChr(x, y, word.diff=FALSE, ignore.white.space=TRUE, convert.hz.white.space=FALSE))
# user system elapsed
# 8.711 0.104 8.811
word.diff and convert are the big issues. Also, still much slower than ses
system.time(ses(x, y)) user system elapsed
# 0.829 0.016 0.844
Actual implementation will be a no frills version of diffChr
close to what tools::Rdiff
does.
No demand for this.