Fortran has computed goto's (though marked obsolescent). Most mainstream C compilers support computed goto's as an extension, Visual Studio being one of the oddballs.
Computed goto's can really speed up state machines by allowing you to replace conditional branching with unconditional indirect branching. I've never seen switch-based solutions come close, notwithstanding that switch statement optimizations are supposedly part of the bread-and-butter of optimizing C compilers.
Note that GCC's documentation on computed goto's uses an example where they index a static array of label pointers. AFAIU the example does this because it speeds up linking and because its more analogous to Fortran code. But it's easier and more performant to simply store and use the label pointers directly (in place of an integer for indexing the array), and the additional linking cost is irrelevant compared to the amount of symbol linking required for even a simple C++ program.
That makes sense. gotos make code generation so much easier, and computed gotos are even more powerful. Lua 5.2 added goto precisely to make it easier to machine generate Lua code. WebAssembly lacks gotos and it's a serious impediment--compiling to WebAssembly requires a special "reloop" algorithm which, while conceptually simple for most code, doesn't work well for the type of critical code for which using goto and especially computed gotos are useful for. Reloop doesn't always work and so sometimes the only way to compile to WebAssembly is to add indirection, such as compiling to an intermediate state machine.
I think WebAssembly originally required reloop because it was originally designed as a purely stack-based VM with properties that made it trivial to verify the bytecode (similar to BPF). Then things got much more complicated for performance reasons and I feel like they probably could have added goto support at that point with little marginal complexity. It's clearly possible--Ethereum did it, BPF permits forward jumps, and eBPF permits both forwards and backwards jumps.
Computed goto's can really speed up state machines by allowing you to replace conditional branching with unconditional indirect branching. I've never seen switch-based solutions come close, notwithstanding that switch statement optimizations are supposedly part of the bread-and-butter of optimizing C compilers.
Note that GCC's documentation on computed goto's uses an example where they index a static array of label pointers. AFAIU the example does this because it speeds up linking and because its more analogous to Fortran code. But it's easier and more performant to simply store and use the label pointers directly (in place of an integer for indexing the array), and the additional linking cost is irrelevant compared to the amount of symbol linking required for even a simple C++ program.