Possible duplicate:
Why Switch / Case and Not If / Else If?
I would like to understand how the instruction switch() case:in C is converted by the compiler into assembler operation codes.
In particular, I am interested in understanding the difference with a series of branches if then else.
Performance comparison is the main topic.
A few words about vocabulary: I am familiar with the basic concepts of assembler, long coded in assembler for simpler systems, but, of course, now nothing is said about the semantics of x86 assembler. Therefore, direct assembly output will not be useful. Pseudocode is much preferable.
Cyan source
share