Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
During compilation, the compiler generates a jump table for a switch because of which it simply refers to jump table to decide which case is to be executed rather than actually checking which case is satisfied. Hence switch works faster if you are working with more number of cases as compared to other alternatives.
18th Dec 2018, 2:19 AM
Shivani Singh
Shivani Singh - avatar