3 ms·
"stack allocation is much, much faster than any sort of heap-based memory management" No, it's not. For short-lived objects, at least on the JVM, allocation i
by PDoyle 10y ago
"stack allocation is much, much faster than any sort of heap-based memory management"
No, it's not. For short-lived objects, at least on the JVM, allocation is a pointer bump, and collection is free, because unreachable objects are not even walked. Stack allocation doesn't beat that by much.