-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|675|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Link Home -> Dev-News


 
HoboBen
Created : 23 August 2010
 

why GNU grep is fast



https://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html
Also interesting discussion on reddit: www.reddit.com/r/linux/comments/d4bfq/why_gnu_grep_is_so_fast_xposted_from_rbsd/

 

Comments


Monday, 23 August 2010, 15:28
JL235
Very interesting for those that haven't encountered the Boyer-Moore algorithm before. I was taught it at university and it's best cases are incredibly faster then a brute force approach.
Monday, 23 August 2010, 16:40
HoboBen
What I also love is how it gets *faster* as the size of the search string increases.

I know if I had to implement it, I'd never have thought of doing it this way. I don't know whether I don't have enough knowledge of famous algorithms or if I need to change the way I approach problems. The way I deal with strings has improved a lot since reading a few C projects, but those guys from the 1970's still beat me every time.
Tuesday, 31 August 2010, 05:28
waroffice
I think the reason they didnt it better in the 1970s is because of machine limitations so you have to find more efficient ways to produce results.

I will read the article when i get time, luckily its my lunch break in 2 mins!

|edit| read it, interesting |edit|