From mboxrd@z Thu Jan 1 00:00:00 1970 From: lm@mcvoy.com (Larry McVoy) Date: Sat, 30 Jan 2016 17:50:56 -0800 Subject: [TUHS] Short history of 'grep' In-Reply-To: References: <20160130030012.GB9762@minnie.tuhs.org> <56AD0AB7.40701@mhorton.net> <56AD1B28.4010908@mhorton.net> Message-ID: <20160131015056.GB14210@mcvoy.com> If you really want to see a fast grep then you need to look at gnu grep by Mike Haertel. Thread about it here: http://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html If you are a performance nerd then that thread and that code is worth a read. Mike is extremely good at performance. He's as good at that as all the original Unix people were at getting stuff to fit in a small amount of memory. I like to think of myself as a performance guy but Mike is better. On Sun, Jan 31, 2016 at 12:41:15PM +1100, Dave Horsfall wrote: > I'm still trying to get my around about how a program such as "egrep" > which handles complex patterns can be faster than one that doesn't... It > seems to defeat all logic :-) > > Is there a simple explanation, involving small words? I've never really > looked at the theory. > > -- > Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer." -- --- Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm