Files
kotlin-fork/compiler/testData/codegen/bytecodeText
Dmitry Petrov 271368ac53 JVM_IR prefer loop with inclusive bound for unsigned integer ranges
In general, we would rather prefer a range-based for loop to look like
a counter loop in Java ('for (i = start; i < end; ++i) { <BODY> }').
This corresponds to

    i = start;
    do {
        if (i >= end) break;
        <BODY>
    } while ( { ++i; true } )

However, HotSpot doesn't recognize Kotlin unsigned integer comparison
in 'if (i >= end) break;' as a counter loop condition. Thus, the loop
doesn't get optimized as a counter loop, resulting in a performance
regression.
If we use exclusive range-based for loop instead, then we actually use
unsigned integer equality instead of unsigned integer comparison, which
is Ok for HotSpot.

KT-49444
2021-11-09 13:25:06 +03:00
..
2020-01-20 16:00:36 +01:00
2020-10-28 11:43:25 +03:00
2020-06-18 12:22:53 +03:00