2 ms·
Can you state the specific comparison that is not apples-to-apples in the OP? The only one I see is the comparison between 'simple' and 'optimized'. But that's
by burntsushi 6y ago
Can you state the specific comparison that is not apples-to-apples in the OP?
The only one I see is the comparison between 'simple' and 'optimized'. But that's more about "what does a simple idiomatic solution look like" and what does an "optimized and possibly less simple" solution look like. That comparison isn't designed to be apples-to-apples in the way you're saying. The simple variant will use Unicode-aware casing in environments where that's the simple and natural thing to do.
IIRC, most of the 'optimized' programs are using ASCII casing. Python doesn't, but casing isn't even close to the bottleneck in that program.