bug#23321: [PROPOSED PATCH] grep: /dev/null output speedup

2016-05-01 Thread Paul Eggert
I have installed this and am closing the bug report.

bug#23321: [PROPOSED PATCH] grep: /dev/null output speedup

2016-04-20 Thread Paul Eggert
arn...@skeeve.com wrote: Testing for same inode is likely to work but not guaranteed. I think it'd be better to compare the major and minor device numbers on the two stat buffers. If they're equal then you know for sure you have a null device in hand. I considered that, but major and minor devi

bug#23321: [PROPOSED PATCH] grep: /dev/null output speedup

2016-04-20 Thread arnold
Paul Eggert wrote: > This sped up 'seq 100 | grep . >/dev/null' by a factor of > 380,000 on my platform (Fedora 23, x86-64, AMD Phenom II X4 910e, > en_US.UTF-8 locale). > + else if (S_ISCHR (tmp_stat.st_mode)) > +{ > + struct stat null_stat; > + if (stat ("

bug#23321: [PROPOSED PATCH] grep: /dev/null output speedup

2016-04-20 Thread Paul Eggert
This sped up 'seq 100 | grep . >/dev/null' by a factor of 380,000 on my platform (Fedora 23, x86-64, AMD Phenom II X4 910e, en_US.UTF-8 locale). * NEWS: Document this. * src/grep.c (grepbuf): exit_on_match no longer implies that -q was specified, so when a match is found, exit with exit_fai