[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: large file support in diff utils

From: Paul Eggert
Subject: Re: large file support in diff utils
Date: Mon, 11 Apr 2005 23:19:41 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Chuck Swiger <address@hidden> writes:

> I mention this because I'd be curious to know what the memory and
> running time (big-O) of diff is.

That's discussed in the references, at least in theory.

> My experience suggests that you can't run diff against anything
> larger than a few 10's of MB before the program's memory usage
> exceeds MAXDSIZE on a 32-bit platform.

It depends on the data.  Here's an example where it runs reasonably
fast on a 32-bit host (2.4 GHz P4).  Admittedly not every case is this

$ ls -l /tmp/tar /tmp/tar1
-rw-r--r--  1 eggert eggert 46325760 Apr 11 23:16 /tmp/tar
-rw-r--r--  1 eggert eggert 46325764 Apr 11 23:16 /tmp/tar1
$ time diff -au /tmp/tar /tmp/tar1
--- /tmp/tar    2005-04-11 23:16:10 -0700
+++ /tmp/tar1   2005-04-11 23:16:24 -0700
@@ -1294184,4 +1294184,4 @@
 "                        to corresponding destination files\n"
 "  -s, --strip         strip symbol tables\n"
 "  -S, --suffix=SUFFIX override the usual backup suffix\n"
-"  -t, --target-directory=DIRECTORY  copy all SOURCE arguments int
\ No newline at end of file
+"  -t, --target-directory=DIRECTORY  copy all SOURCE arguments intabc

real    0m0.649s
user    0m0.140s
sys     0m0.470s

reply via email to

[Prev in Thread] Current Thread [Next in Thread]