I was wondering how switch which uses strings as a constants in case block is implemented? When I do debug, and do Step by step execution, I see that execution goes from one case to another linear. So it looks like syntax sugar which in reality is chain of if/else. I would rather expect some compiler optimisation here. My question then is if Map<String, _lambda> will be faster then switch/case for strings? I would rather not do any naive time measurements since this can lead to wrong conclusions.