Get the latest tech news
Matching Regexps 200 Times Faster
A blog about Ruby, Performance and Concurrency
Here are the results on my machine ( AMD Ryzen 7 3700X 8-Core Processor), with frequency scaling disabled and the performance CPU governor: If you guessed earlier that the C extension code + SIMD would be fastest, you may be surprised to learn the pure-Ruby version is considerably faster (on TruffleRuby)! Sometimes, such as in the cases shown in this blog post, the idiomatic pure-Ruby solution is also the fastest and even faster than C code or inline assembly.
Or read this on Hacker News