Get the latest tech news
The fastest way to detect a vowel in a string
Diving into CPython, bytecode, regex, and algorithmic analysis to find the fastest method.
This post involves 11 different methods of detecting a vowel, algorithmic analysis, dissembling Python bytecode, inspecting the CPython implementation, and even looking at compiled regex opcodes. The book Effective Python says,"list comprehensions are clearer than the map and filter built-in functions because they don't require lambda expressions". My beloved set intersection is plenty fast for real world use but doesn't look great in the ranking.
Or read this on Hacker News