Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Performance regression for ByteArrayMemory on Java 25

Aperta
#224 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
performance

Direzione di ricerca

Read ByteArrayMemory and compare its atomic access handling with ByteBufferMemory's lock fallback. Run the multithreaded BenchmarkSievePrimes benchmark on JDK 25 to observe the reported regression; done for the immediate bug means ByteArrayMemory uses the slow lock path when atomic access is unsupported. The NativeMemory promotion is a separate, broader proposal.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

If running the multithreaded BenchmarkSievePrimes bench on JDK 25, one can witness a radical performance breakdown. On my local machine it runs 220 times slower than on JDK 21. The reason is primarily that it calls isAccessModeSupported on every atomic read/write. On JDK 25 this throws a NoSuchMethodError internally before returning false. AFAIK there is no supported way of doing atomics on byte[] in JDK 25 and in this scenario ByteArrayMemory should fallback to the slow lock path just like ByteBufferMemory.

After fixing this, there still won't be a performant memory on JDK 25. I propose the Redline NativeMemory (or a hardened version thereof) is promoted to a neutral supported module. It still needs its own module if runtime is to remain on JDK 11. My own experimentation has shown that the native mapped memory can also give a good performance boost when using the bytecode compilers.

Lingua principale
Java
Stelle
310
Fork
23
Merge medio
2g 8h
PR unite (30g)
33

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bytecodealliance/endive

Tutte le issue di bytecodealliance/endive

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.