Cojocaru Alexandru
465f9512b7
cut: improve performance, especially with --output-delimiter
...
Use a sentinel value that's checked implicitly, rather than
a bit array, to determine if an item should be output.
Benchmark results for this change are:
$ yes abcdfeg | head -n1MB > big-file
$ for c in orig sentinel; do
src/cut-$c 2>/dev/null
echo -ne "\n== $c =="
time src/cut-$c -b1,3 big-file > /dev/null
done
== orig ==
real 0m0.049s
user 0m0.044s
sys 0m0.005s
== sentinel ==
real 0m0.035s
user 0m0.032s
sys 0m0.002s
## Again with --output-delimiter ##
$ for c in orig sentinel; do
src/cut-$c 2>/dev/null
echo -ne "\n== $c =="
time src/cut-$c -b1,3 --output-delimiter=: big-file > /dev/null
done
== orig ==
real 0m0.106s
user 0m0.103s
sys 0m0.002s
== sentinel ==
real 0m0.055s
user 0m0.052s
sys 0m0.003s
eol_range_start: Removed. 'n-' is no longer treated specially,
and instead SIZE_MAX is set for the 'hi' limit, and tested implicitly.
complement_rp: Used to complement 'rp' when '--complement' is specified.
ADD_RANGE_PAIR: Macro renamed to 'add_range_pair' function.
* tests/misc/cut-huge-range.sh: Adjust to the SENTINEL value.
Also remove the overlapping range test as this is no longer
dependent on large ranges and also is already handled with
the EOL-subsumed-3 test in cut.pl.
2013-05-08 11:51:37 +01:00
..
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-04-25 11:13:48 +01:00
2013-04-10 14:34:52 +01:00
2013-01-01 04:51:20 +01:00
2013-05-08 11:51:37 +01:00
2013-04-29 17:54:27 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-04-25 11:13:48 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-28 11:03:01 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-28 01:49:56 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-10 20:30:53 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-04-25 11:13:48 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-26 02:37:13 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-03-25 20:07:14 +00:00
2013-04-04 02:55:55 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-04-25 11:13:48 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-05 16:05:54 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-26 02:38:52 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-28 23:35:45 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00