Switch instruction is fixed and well optimized if you use it with constants.
The code like this:
var case_val = 3;
Was not optimized correctly to Console.WriteLine(3); (the rest of code should be removed as dead). Right now the generated C++ code is correct and equivalent with the optimum code.
Escape analysis will allocate also arrays on stack (not the array content but the smart-pointer is not allocated at all). In the past was generated bad code for it.