In the if-else case, we do not create a jump table, and all cases are executed at runtime.
This is not necessarily true; compilers may still optimise if-statements into jump-tables if they're simple enough. Whether any compiler bothers doing this is another question, of course.
Also, another option is to build your own jump-tables. In JavaScript, these are called "objects" 😜
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is not necessarily true; compilers may still optimise if-statements into jump-tables if they're simple enough. Whether any compiler bothers doing this is another question, of course.
Also, another option is to build your own jump-tables. In JavaScript, these are called "objects" 😜