Edoardo Luppi
01/08/2024, 12:50 PMif (index !in 0..<size) {
return IntStream.EOF
}
Is compiled down to:
if (!(0 <= index ? index < $this.size_1 : false)) {
return Companion_getInstance_6().get_EOF_18juz1_k$();
}
That's a very atypical way of performing a check like that.
When I switch to a "manual" range check:
if (index < 0 || index >= size) {
return IntStream.EOF
}
the output gets a little bit better:
if (index < 0 ? true : index >= $this.size_1) {
return Companion_getInstance_6().get_EOF_18juz1_k$();
}
Artem Kobzar
01/08/2024, 12:55 PMEdoardo Luppi
01/08/2024, 12:56 PMin
or !in
expressions, which are more readable.Edoardo Luppi
01/08/2024, 2:22 PMArtem Kobzar
01/08/2024, 2:52 PM