4 ms·
I dont think this is true for the nullability type... Which are in essence compile time optionals... Without the overhead.
by TeeWEE 4y ago
I dont think this is true for the nullability type... Which are in essence compile time optionals... Without the overhead.
- pjmlp 4y agoSame can be achieved with static analysis tooling like Sonar, Findbugs, PMD,...
- tadfisher 4y agoKotlin has a runtime cost here, by inserting runtime null checks. You can disable them with a compiler flag if you don't have non-Kotlin consumers.
- ackfoobar 4y agoSomeone did the JMH test for the cost of explicit null checks. https://sites.google.com/a/athaydes.com/renato-athaydes/posts/kotlinshiddencosts-benchmarks https://sites.google.com/a/athaydes.com/renato-athaydes/post... Apparently the JVM can inline, then do null check elimination.