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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Times

Times

Photo of Regexps 200

Regexps 200

Related news:

News photo

Photo calorie app Cal AI was built by two teenagers

News photo

iOS 19 Redesign Now Widely Rumored

News photo

Ethereum private key stealer on PyPI downloaded over 1,000 times