Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Java 7 has introduced a very specific API (java.lang.invoke) to be able to inline reflection calls.

So lookups are quite slow, but invocations are fully inlined.

java.lang.invoke API is fast to the point that for doing faster string concatenation in Java 9, Aleksey Shipilev has used this API instead of introducing a new opcode in the JVM [1].

[1] https://youtu.be/wIyeOaitmWM?list=PL2ekzZZrxVUmBXtrwS7pLabUu...



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: