Hacker News new | ask | show | jobs
by mkching 4688 days ago
To those wondering if this is worth it, the method of using a trie-style regexp to optimize this type of word matching has been used in the Perl community for a while now and it does work well.

Starting with v5.10, if Perl encounters a regexp that is just a list of strings, it will even use trie-based matching automatically.

Prior to that, people have been using modules such as Regexp::Trie to build optimized regexps and noted increases in performance similar to the benchmark shown in the post.