Live data from Hacker News

Why GNU grep is fast (2010)

lists.freebsd.org

71–80 of 133 posts

Re: Why GNU grep is fast (2010)

#71

The fastest programs are the ones that don't prepare themselves to do something and then don't do that thing. Another way to say just do one thing well.

The fastest programs return 0 immediately and don't do shit.

I'd imagine the fastest programs don't always return 0, since that's an extra MOV instruction.

Re: Why GNU grep is fast (2010)

#75
The article mentions the difference in times from forcing mmap.

  $ grep --mmap "fleagle" *
  grep: the --mmap option has been a no-op since 2010
  ...
Coincidentally, the article is from 2010.

Re: Why GNU grep is fast (2010)

#76

Earlier quoted context omitted.

hey hey hey, if you want hacker news to stay fast you should't make it do too much!

The systems I wrote were independent of HN and didn't slow it down. I got significant grief for them and pulled them. Standard "wisdom" for start-ups includes "If you're not embarrassed by your first product then you didn't launch early enough," and "Try the minimal viable product before investing too much time." I both launched early, and made sure the "product" was absolutely minimal. It got slated by the people it…

The complainers were probably just a vocal minority.

Re: Why GNU grep is fast (2010)

#77
post #45

The inverse is this...what is modern software doing that makes them so slow?

Development time. Why invest time in such optimizations instead of other features when the app is fast enough? Time is not infinite and we need to prioritize what takes our development time.

Re: Why GNU grep is fast (2010)

#79

The fastest programs are the ones that don't prepare themselves to do something and then don't do that thing. Another way to say just do one thing well.

The fastest programs return 0 immediately and don't do shit.

Returning 0 is technically doing something. It might not be something that you find useful but it is something.

Re: Why GNU grep is fast (2010)

#80
post #53

Earlier quoted context omitted.

[deleted]

I think Kent was being sarcastic - his point is that it's rather pointless to optimize until the system is producing correct results. He's also famous for the "Make it work, make it right, make it fast" quote.

'Compile, conform, perform'
Post reply on HN