uniq: replace a wasteful loop with simple calculation
authorJim Meyering <meyering@redhat.com>
Mon, 17 Jan 2011 11:36:58 +0000 (12:36 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 17 Jan 2011 18:07:58 +0000 (19:07 +0100)
commitbdaef0686fabc1900c4b3686de17a3ffd9f4d847
treebeacc529fd5eb7b408518178eb69b545181f7085
parent1f0653066c58707a210f52164e16bb5561640393
uniq: replace a wasteful loop with simple calculation

* src/uniq.c (find_field): Remove the byte-skipping loop altogether.
Instead, perform the simple calculation.  This results in a 10%
performance improvement for large byte offsets.
src/uniq.c