Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
First comments on top threads
HN comment orderI tested string searching algorithms a few years ago[0][1], and Brute Force was surprisingly performant, enough that picking a string searching algorithm becomes an engineering tradeoff. It found a sentence fragment at the end of Moby Dick within 8ms, 7 times slower than Boyer-Moore. But most of us aren't searching Moby Dick, but rather a HTTP header, some user input, or a paragraph of a document. Even long-winded users won't write Moby Dick into your <textarea>. Most languages and libraries…
It's probably worth pointing out that OS X is using BSD grep. You will see a phenomenal difference if you install the gnu grep via homebrew: $ homebrew info grep GNU grep, egrep and fgrep https://www.gnu.org/software/grep/ /usr/local/Cellar/grep/3.3 (21 files, 885.3KB) * Poured from bottle on 2019-01-03 at 12:23:37 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/grep.rb ... This is a very arbitrary example, but I've got 1.5Gb application log sitting on my machine right now that'll suffice. I'll…
If you use grep in OS X, and you use it a lot (even called through other programs/libraries) it pays in time to install GNU grep vs. the default OS X provided one. It's several times faster. Ran into this when benchmarking grep + GNU Parallel on OS X vs. Linux in my thesis (raftlib modeling) work. Results on my small MacPro cluster didn't match those on Linux. The OS X runs were orders of magnitude slower despite almost identical…
The key to making programs fast is to make them do practically nothing. This is the Ultimate Truth of optimizing computer programs, and it seems so few people understand it. "Why can't you make Python faster!?" Because Python does a lot of stuff without you asking.
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
- Breakout years
- 7
- Total points
- 2997
- Total comments
- 860
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2010-08-23 | Why GNU grep is FastFirst breakout · Best thread | giu | 512 | 115 |
| 2011-03-31 | Why GNU grep is fast | shawndumas | 329 | 68 |
| 2011-08-08 | Why GNU grep is fast | ColinWright | 253 | 43 |
| 2013-11-28 | Why GNU grep is fast (2010) | kurren | 495 | 129 |
| 2015-03-05 | Why GNU grep is fast (2010)Hall induction | bpierre | 151 | 40 |
| 2015-04-27 | Why GNU grep is fast (2010) | dnet | 31 | 5 |
| 2015-05-06 | Why GNU grep is fast | MindTwister | 4 | 0 |
| 2016-08-24 | Why GNU grep is fast (2010) | mozumder | 417 | 145 |
| 2016-10-27 | The key to making programs fast is to make them do practically nothing. ;-) | rbanffy | 1 | 0 |
| 2018-06-08 | Why is GNU grep so fast? | ghosthamlet | 2 | 0 |
| 2019-03-29 | Why GNU grep is fast (2010) | jacobedawson | 511 | 218 |
| 2020-07-23 | Why GNU grep is fast (2010) | letientai299 | 78 | 35 |
| 2022-01-14 | Why GNU grep is fast | rsecora | 4 | 0 |
| 2022-07-24 | Why GNU grep is fast (2010)Latest 20+ point return | pcr910303 | 209 | 62 |
