Re: diff(1) performance

2016-02-14 Thread Edd Barrett
On Sat, Feb 13, 2016 at 01:27:01PM -0700, Todd C. Miller wrote: > GNU diff uses a superior (more modern) algorithm. Changing that > means rewriting the guts of diff(1). The GNU diff code includes > references to papers describing the algorithm. Right. A task for a rainy day then. Cheers --

diff(1) performance

2016-02-13 Thread Edd Barrett
Hey, I've not looked into this at all, but looks like diff(1) could be optimised: # With GNU diff: $ time gdiff -u file1 file2 > out-gdiff gdiff -u file1 file2 > out-gdiff 0.16s user 0.13s system 101% cpu 0.286 total # With OpenBSD diff: $ time diff -u file1 file2 > out-bdiff diff -u file1

Re: diff(1) performance

2016-02-13 Thread Michal Mazurek
On 18:26:46, 13.02.16, Edd Barrett wrote: > Hey, > > I've not looked into this at all, but looks like diff(1) could be > optimised: It looks like both NetBSD and FreeBSD use GNU diff. -- Michal Mazurek

Re: diff(1) performance

2016-02-13 Thread Todd C. Miller
GNU diff uses a superior (more modern) algorithm. Changing that means rewriting the guts of diff(1). The GNU diff code includes references to papers describing the algorithm. - todd