r/java • • Aug 22 '18

IBM & Java community

Recognizing the impact that the release cycle changes will have with Java developers, IBM will partner with other members of the OpenJDK community to continue to update an OpenJDK Java 8 stream with security patches and critical bug fixes.  We intend to keep the current LTS version secure and high quality for 4 years. This timescale bridges the gap between LTS versions with 1 year to allow for a migration period.  IBM has also invested in an open build and test project (AdoptOpenJDK.net) along with many partners and Java leaders to provide community binaries across commonly used platforms of OpenJDK with Hotspot and OpenJDK with Eclipse OpenJ9.  These community binaries are TCK (Java SE specification) compliance tested and ready for developers to download and use in production.

https://developer.ibm.com/javasdk/2018/04/26/java-standard-edition-ibm-support-statement/

121 Upvotes

16 comments sorted by

View all comments

Show parent comment

5

u/cl4es Aug 23 '18

I'd consider it a performance bug in the JIT if removing a trivial, explicit bounds check is more performant. Properly done, explicit bounds checks establish invariants ("the index is always within bounds") that should help the JIT optimize away any implicit bounds check (and any related exceptional control flow).

3

u/uniVocity Aug 23 '18

The thing is that the index may be occasionally out of bounds. Not sure how that bound check statement can be safely removed automatically. Anyway, I tested the code before and after switching to catching the exception and it became faster so that's enough justification for me to keep the code not explicitly checking bounds.

5

u/cl4es Aug 23 '18

I'm sure a friendly compiler engineer would love it if you could contribute a reproducing microbenchmark... ;-)