Hacker News new | ask | show | jobs
by pron 4591 days ago
Java also gives native libraries direct access to primitive arrays, but that requires pinning them in place for the duration of the call (i.e. not letting the GC move them) so it incurs some performance penalty.

Direct byte buffers are very common in high-performance Java code. Reading/writing from/to those buffers can be made just as fast as plain Java arrays.

1 comments

Thanks for the information. Sorry I was misinformed before...