4 ms·
Why GNU grep is fast (2010)
- ColinWright 11y agoThis is posted again and again, and I re-read it every time. I'm also reminded of this: You can't make your code run faster, you can only make it do less work. I usually put links to previous discussions because I find value in the comments by HN users, but I'm not going to do that this time. You can search if you want to find previous discussions - there have been many, and some contain some real gems.
- sudioStudio64 11y agoI know what you mean. I'm always like..."Uhh! Repost." Then I re-read it and...become enlightened.
- taeric 11y agoSome times you can make it do more book keeping to work faster, though. This is actually a good example of that. And, then there is an amusing reality to your message. What has done more to increase the speed of grep? Good techniques, or advances in computing speed? That is, making your code run faster has probably increased the speed of grep more so than making it do less. :)
- js2 11y agoSee also, The Treacherous Optimization: http://ridiculousfish.com/blog/posts/old-age-and-treachery.html http://ridiculousfish.com/blog/posts/old-age-and-treachery.h...
- sctb 11y agoMost recent discussion: https://news.ycombinator.com/item?id=9153203 https://news.ycombinator.com/item?id=9153203