On 9/29/2021 7:08 PM, Luís Ferreira wrote:
This patch allows the compiler to efficiently generate jump tables instead of
using if-else-if.

Signed-off-by: Luís Ferreira <cont...@lsferreira.net>
I'm not sure this is terribly useful.  Compilers have the ability to analyze the underlying code and make sensible decisions for how to implement either form.   So the right metric here is does this make the code cleaner/easier to understand.  With just 3 clauses it's hard (for me) to make the case that it is considerably cleaner.

Jeff


Reply via email to