292
Linus sets his foot down, against the gatekeeping attempts in the kernel
(lore.kernel.org)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
That's a performance optimisation which llvm is likely to do for you anyways, jump tables aren't exactly rocket science. Gazing into my crystal ball, might have to turn your enum variant
Foo(u8)
with possible values 0..15 intoFoo0
throughFoo15
(or maybe betterFoo(EnumWith16Variants)
) so that the compiler doesn't have to evaluate code to figure out that it doesn't need to NOP the rest of the jump range out, or bail out of generating a jump table, whatever it would do.