홈으로 돌아가기
Hacker News

Java 레코드를 네이티브 메모리에 빠르게 매핑하기 위한 라이브러리

Library for fast mapping of Java records to native memory

152 points 35 comments joe_mwangi 2026-05-12 04:33

댓글

4
wood_spirit 2026-05-12 04:58
ENGLISH (원문)
This is interesting. Java desperately needs an array of struct for type safe sugar over high performance arenas, but the areas you’d turn to this would be in a zero allocation effort where the cost of the this library’s off-heap and the object allocation in the getters and setters etc largely negate the advantages for a lot of use cases.
kosolam 2026-05-12 05:04
ENGLISH (원문)
Nice. Very clean api.
joe_mwangi 2026-05-12 05:07
ENGLISH (원문)
Yup. Totally agree. Java does needs an array of structs. Hopefully value classes will help out through flattened array. But in future, one can use value records with this library with probable zero cost allocation. But the library doesn't use any reflection calls for get and set hence high performance as a result, and using records helps a lot with escape analysis. Planning to do some serious benchmarks soon. Some preliminary tests shows it's similar to c code (example code in test package). Performance suffers if record fields are arrays due to heap allocation of arrays.
joe_mwangi 2026-05-12 05:10
ENGLISH (원문)
Thanks. Main goal. Unions is where I decided to pause - no simple and ergonomic way to do it at the moment.

좋아요가 저장됐어요!

로그인하면 어디서나 확인하고
영구적으로 저장할 수 있어요.