3 ms·
As I understand it some things managed languages have against them; The garbage collector. Even lock free garbage collectors require some synchronization. That
by petke 11y ago
As I understand it some things managed languages have against them;
The garbage collector. Even lock free garbage collectors require some synchronization. That doesn't scale well to many cores.
Another things is that low level memory layout and alignment matters for users, to avoid false sharing etc. In managed languages you end up fighting a system that tries to hide low level things like this from you.
Finally managed languages have ref semantic and therefore use a lot of pointers under the hood. However the data layout that is the cache friendliest is contiguous memory, so the core can predict and pre fetch the next values into cache. A core that has to chase down pointers all over the memory address get a lot of cache misses.