2 ms·
> More memory is used, which means more CPU cache evictions happen The first part is true, and the second part is sort of true, but it may or may not matter. T
by kaba0 4y ago
> More memory is used, which means more CPU cache evictions happen
The first part is true, and the second part is sort of true, but it may or may not matter. The order of magnitude speedups that good cache usage can cause only happens when you are having a small hot loop working over a huge amount of data that has an easy to guess access pattern (e.g. serial). I am not convinced that your ordinary program would have too many such loops and thus that it would have a huge speed up were it rewritten in C from a managed language.
> There will be things the language won't let you do, because it is garbage collected
There are always escape hatches
> There will be extra FFI costs, like when making OS calls or calling into other languages
Do you mean like GC barriers and such?
But we do agree on your last paragraph, and sure low-level languages will always be needed. But the niche where they are irreplaceable are very small, if we are pedantic OS and games are also not necessarily to be written in them (see Microsoft’s singularity, the latter has plenty of examples)