-
Notifications
You must be signed in to change notification settings - Fork 2k
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
filiphr first submission #12
Conversation
Nice one, thanks a lot! Will evaluate this one tomorrow, first need to install that Zulu JDK. |
Thanks. It doesn't have to be Zulu though. It needs a JDK that has Shenandoah GC, the ones provided by Oracle do not have it (Graal, Oracle JDK and Open JDK). Zulu, Temurin, RedHat, SAP have it (in case it is easier for you to use one of the others) |
Hey @filiphr considering that the builds from https://builds.shipilev.net/ are now permitted, do you think it would be interesting to use a variation of the Shenandoah builds? So you would be able to compare the difference between a "stock" JVM from one build of the Shenandoah branch itself, with perhaps some tuning that is currently not available outside. |
Hey @lobaorn, it would for sure be interesting to try out a different build from https://builds.shipilev.net/. Which one will you suggest me to try out? I've been also working on using memory mapped files locally and it seems like the GC is not making any special differences now. |
In Twitter/X @shipilev told to just use the default release tags for the builds, so in this case using Docker to facilitate (https://hub.docker.com/r/shipilev/openjdk/tags) would be probably in the direction of the Shenandoah build, and try with the generational experimental feature/flag to check if it offers an improvement, or in the direction of the Lilliput build using Generational ZGC and perhaps follow the tuning suggestions of @fisk here aboug GenZGC: #15 (comment) So there are at least two different directions of using the builds, I would assume. |
Thanks @lobaorn, I'll check Twitter and the Comments in #15 as well. I've done some rework on this using memory mapped files thanks @bjhara and @royvanrijn for their submissions, I learned something new. Changed to use With the updates it now runs in ~35s on my machine |
If I change to using Graal 21.0.1 ( |
@gunnarmorling, done. I've added If it isn't possible to use Oracle GraalVM (it is available on SDKMan) then it is fine to just run this with the default JDK |
Nice, 00:21.853! 4th place rn! |
Nice, thanks for merging it. Such a fun experience. Will try to speed it up a bit more :) |
Really interesting and fun challenge @gunnarmorling.
I gave it a go, first implementation using Shenandoah GC (reduces GC pauses significantly) and uses parallel iteration.
My implementation is: [CalculateAverage_filiphr.java]
I used OpenJDK Runtime Environment Zulu21.30+15-CA (build 21.0.1+12-LTS) (21.0.1-zulu)
On Macbook Pro (8 core Intel 64 GB RAM) it runs in +/- 1m40s, the reference implementation runs in +/- 4m9s