DEV Community

Discussion on: ✔||🤢 Commit or Vomit | Switch(true)

Collapse
 
sirnino profile image
Antonino Sirchia

Honestly you made me really curious about the performance... The switch normally are the first choice to avoid writing long if-else chains because the code "jumps" directly to the right place without evaluating all the other conditions... I'm curious to understand if also in this case these considerations are valid or not... I'll try and, if so, it will be an heart

Collapse
 
jmdejager profile image
🐤🥇 Jasper de Jager

I don't expect any performance gains but I'm looking forward to your findings!