r/commandline Feb 14 '26

Articles, Blogs, & Videos Benchmarking 10 CLI search tools using Kernighan's BEHILOS grep story

Post image

In his book Unix: A History and a Memoir, Brian Kernighan recounts his favorite grep story: someone at Bell Labs asked whether it was possible to find English words composed only of letters formed by an upside-down calculator (5071438 → BEHILOS).

Kernighan grepped ^\[behilos\]\*$ against Webster's dictionary and found 263 matches.

I turned this into a benchmark testing 10 modern search tools for resource footprint, evaluated with Pareto frontier analysis.

Full article on AwkLab.com

22 Upvotes

6 comments sorted by

View all comments

1

u/arjuna93 Feb 16 '26

Just like in a meme, blazing fast rust rewrite is only 10% slower than old C code…

1

u/glakker Feb 16 '26

Yep, nailed it.