STMicroelectronics Interview Question

Why function switch runs fast then if then?