-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Parity with Hotspot compiler in a loop unrolling #1647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, this should certainly be automatic. I assume that you mean here "full unroll" where a loop body is unrolled completely due to constant iteration bound as opposed to "partial unroll" where just multiple subsequent iterations of a loop are merged into one, but the total iteration bound of the loop is unknown? How much of a performance difference are you experiencing for unrolled vs non-unrolled? Those policies are sometimes sensitive as the too much unrolling can negatively impact the instruction cache performance. |
I mean "partial unroll" that usually done by 4x duplication of the loop body with additional copy for mini-loop that handles the remaining part. Below are results for GraalVM CE/EE 19.2.0 for the 1st case of ASCII string parsing with and without manual unrolling that is switched on/off by the GraalVM CE 19.2.0 with manual unrolling (isGraalVM = true)
GraalVM EE 19.2.0 with manual unrolling (isGraalVM = true)
GraalVM CE 19.2.0 without manual unrolling (isGraalVM = false)
GraalVM EE 19.2.0 without manual unrolling (isGraalVM = false)
|
OK, thank you so much for these interesting measurements. We will investigate asap. @tkrodriguez @gilles-duboscq |
I have a couple of cases when Hotspot compiler do it better for JDK 8 than GraalVM 19.1.1.
Currently, I'm trying to mitigate it by unrolling some hottest cases manually:
It would be better to have a parity with Hotspot in automatic unrolling of loops to avoid code cluttering and maintenance burden.
The text was updated successfully, but these errors were encountered: