Does the Kotlin compiler optimizes `when` expressi...
# language-proposals
r
Does the Kotlin compiler optimizes
when
expressions when they are translatable to JVM
switch
statements?
Copy code
when (1) {
  0 -> ...
  1 -> ...
}
Copy code
when ('a') {
'a' -> ...
'b' -> ...
}
If it doesn't is there any way to instruct it to do so or are
if/else
recommended for high performance cases over
when
?