Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 1996 11:15:18 +0100
From:      Wolfram Schneider <wosch@cs.tu-berlin.de>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        hackers@freebsd.org
Subject:   Re: wc(1)
Message-ID:  <199601151015.LAA20061@caramba.cs.tu-berlin.de>
In-Reply-To: <199601100713.SAA00480@godzilla.zeta.org.au>
References:  <199601100713.SAA00480@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans writes:

>Freshly compiled statically linked wc's only show the 20% unimprovement
>for plain wc here under -current.  wc -l is only 6% slower.

The algorithm is broken. If reading from stdin wc [-lc]
always calculate words.


$ uname -a
FreeBSD freebsd 2.2-CURRENT FreeBSD 2.2-CURRENT #0: Sat Jan 13 20:19:39 MET 1996     root@freebsd:/usr4/src/src/sys/compile/FREEBSD  i386

$ cat  /usr/share/dict/words | time ./wc-netbsd/wc -c
 2486813 
        0.38 real         0.01 user         0.11 sys

$ cat  /usr/share/dict/words | time ./wc-freebsd/wc -c
 2486813
        1.05 real         0.76 user         0.04 sys


Wolfram



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601151015.LAA20061>