3 ms·
This sort of practice is present in the implementation of every mainstream programming language. 'Unsafe' operations are the bread and butter of computation. A
by jakevn 11y ago
This sort of practice is present in the implementation of every mainstream programming language. 'Unsafe' operations are the bread and butter of computation.
As far as use in libraries, you wont get the same performance without it in most of the places it is used. This is much like Python's 'unsafe' use of C modules for performance.
- dikaiosune 11y agoAs a corollary, many Java programs rely really heavily on very thick layers of abstraction (in my day-to-day on a multi-node "enterprise" Java app I regularly see stack traces of 200-500 function calls), and it's important to keep each slice of those abstractions as thin as possible. As another reply pointed out, much better to do some hinky things with the JVM then to call out through the native interface every time you need high performance for a tight loop.