Java performance issues on ryzen #679
chrvanorle
started this conversation in
General
Replies: 1 comment
-
If you could provide a commit, a branch or code of some kind that is easier for people to run I think you will get more help. I think a lot here will depend on how the JIT is compiling the code. Details such as if sieveSize is a constant/readonly will impact the compiler. Diving in to the ASM should help finding the problem. My guess is that the JIT have trouble inlining |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are some small changes i made to my runSieve implementation, that should improve performance a little bit. At worst, i figured it wouldn't matter but be cleaner. The
I32CSearchNextSize
implementation below is what i had originally, andI32CReference
is what i have currently (PR coming at some point).Since maybe the compiler/JIT is doing some things that end up badly for ryzen, i tried some alternatives. On the 8750H, performance is virtually identical, but on ryzen some of the changes halve performance. To be honest, the results don't make sense to me, so i figured maybe someone else has a clue what is going on here.
Edit:
Full code here https://github.com/chrvanorle/Primes/tree/java-ryzen/PrimeJava/solution_5
It seems my unrolled implementations doesn't seem affected, so it might be related to the loop in PrimeSieveBaseBit.java
Beta Was this translation helpful? Give feedback.
All reactions