Possible Duplicate:
Why Switch/Case and not If/Else If?
I would like to understand how a switch() case:
statement in C
is translated by the compiler into assembler opcodes.
Specifically, i'm interested in understanding the difference
with a serie of if then else
branches.
Performance comparison is the main topic.
A few words on vocabulary : i'm familiar with assembler main concepts, having coded in assembler a long time ago for simpler systems, But certainly do not now anything about x86 assembler semantic. So a direct assembler output will not be useful. Pseudo-code is much prefered.