Join Slack
Hi, I have a use case where I can optimize a type lookup with a fast `switch` based on ints. Does th...
# compiler
r
raulraja
03/31/2019, 10:53 PM
Hi, I have a use case where I can optimize a type lookup with a fast
switch
based on ints. Does the kotlin compiler ever optimizes
when
to become a fast
switch
based on ints? If not what is the equivalent in Kotlin of
https://www.scala-lang.org/api/current/scala/annotation/switch.html
if any? thanks!
👌 1
raulraja
04/01/2019, 12:43 AM
To answer myself I ended up verifying that when all cases are int constants it does the tableswitch optimization 🎆
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by