Cojocaru Alexandru
ef9db5735a
cut: reduce CPU overhead in determining item to output
...
print_kth() is the central function of cut used to
determine if an item is to be output or not,
so simplify it by moving some logic outside.
Benchmark results for this change are:
$ yes abcdfeg | head -n1MB > big-file
$ for c in orig split; 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.111s
user 0m0.108s
sys 0m0.002s
== split ==
real 0m0.088s
user 0m0.081s
sys 0m0.007s
* src/cut.c (print_kth): Refactor a branch to outside the function.
Related to http://bugs.gnu.org/13127
2013-04-29 17:54:39 +01:00
..
2013-02-04 23:40:32 +00:00
2013-01-23 01:03:38 +01:00
2013-01-23 01:03:38 +01:00
2009-08-25 09:21:00 +02:00
2013-01-01 04:51:20 +01:00
2013-01-23 01:03:38 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-20 04:04:25 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-20 04:04:25 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-20 04:05:30 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2008-11-20 10:21:52 +01:00
2013-02-06 15:57:34 +00:00
2013-04-10 14:34:52 +01:00
2013-04-29 17:54:39 +01:00
2013-01-23 01:03:38 +01:00
2013-01-01 04:51:20 +01:00
2013-04-14 01:00:45 +01:00
2013-01-28 14:56:44 +01:00
2013-01-01 04:51:20 +01:00
2013-02-28 03:33:14 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-23 06:42:51 +01:00
2013-01-01 04:51:20 +01:00
2013-01-23 01:03:38 +01:00
2013-01-23 01:03:38 +01:00
2013-01-01 04:51:20 +01:00
2013-02-20 04:04:25 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-20 04:04:25 +00:00
2011-07-15 10:55:04 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-23 01:03:38 +01:00
2013-01-23 01:03:38 +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-14 01:01:21 +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-22 21:31:32 +01:00
2013-01-01 04:51:20 +01:00
2013-02-28 01:49:56 +00:00
2013-01-23 01:03:38 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-04-04 02:46:35 +01:00
2013-03-24 02:29:57 +00:00
2013-01-01 04:51:20 +01:00
2013-03-04 18:09:49 +00:00
2013-02-20 04:04:25 +00:00
2012-01-09 21:51:59 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-23 01:03:38 +01:00
2013-01-23 01:03:38 +01:00
2013-01-23 01:03:38 +01:00
2013-01-01 04:51:20 +01:00
2013-02-06 15:57:34 +00:00
2013-01-23 01:03:38 +01:00
2013-01-23 01:03:38 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-20 04:04:25 +00:00
2013-03-22 16:18:45 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-23 01:03:38 +01:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-01-23 01:03:38 +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-23 01:03:38 +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-23 01:03:38 +01:00
2013-01-26 02:37:13 +00:00
2013-01-01 04:51:20 +01:00
2013-01-23 01:03:38 +01:00
2013-04-04 02:55:55 +01:00
2013-01-01 04:51:20 +01:00
2013-01-23 01:03:38 +01:00
2013-01-23 01:03:38 +01:00
2013-04-28 03:43:40 +01:00
2013-01-23 01:03:38 +01:00
2013-02-20 04:04:25 +00: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-02-20 04:04:25 +00:00
2013-04-20 16:34:23 +02: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-02-06 15:57:34 +00:00
2013-01-01 04:51:20 +01:00
2013-01-01 04:51:20 +01:00
2013-02-06 15:57:34 +00:00
2013-02-20 04:04:25 +00:00
2013-01-01 04:51:20 +01:00
2007-07-10 19:00:00 +02:00
2007-07-10 19:00:00 +02:00
2013-01-01 04:51:20 +01:00
2012-01-09 21:51:59 +01:00
2013-01-23 01:03:38 +01:00
2013-02-28 18:20:30 +00:00
2013-01-01 04:51:20 +01:00
2013-01-12 13:36:29 +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