This article is almost ten years old, I believe that modern compilers all create efficient dispatch tables without all of this manual work - even ten years ago I don’t think large switch statements were a problem area. Most emulators use these heavily. But I think it does give an idea what is going on behind the scenes. There are a number of ways compilers could implement this based on the number of cases and how dense they are. I know that go will organize sparse case values into a sorted array and do a binary search to find where to jump. I think Perl uses hash tables for the same purpose.