by georgerobinson · 11y ago · 0 comments
How can this be possible? How can allocation via JavaScript (which I assume must call malloc underneath) be faster than just malloc in C++? Does Node have a slab allocator for buffers like the Linux kernel has for task structs, or are objects allocated on the heap on demand?
Java for example does object instantiation much faster.
It's also common to replace malloc with an in house implementation for performance sensitive code.