4 ms·
> Potentially an OS kernel written (for example) in a language like Rust (though not without its own challenges) could have more consistent performance and lowe
by higerordermap 6y ago
> Potentially an OS kernel written (for example) in a language like Rust (though not without its own challenges) could have more consistent performance and lower memory overhead.
Yeah potentially, but implementing in easier language in less time may be acceptable trade-off.
Because Go is not poster child of fast GC'd languages either (conscious choice of a simpler optimzer for fast builds), and the implementation only showed 10%-15% difference with linux, the situation is optimistic.
With better escape analysis in GC languages and better compilers, the gap can be reduced further.
> Apple adopting ARC
That's because of legacy interop concerns mainly. Swift's ARC implementation was once horrible, and ARC still seems to be a significant bottleneck in SwiftUI. The ARC more efficient blanket statement myth is mainly spread by apple fanboys, who might not even have heard the words 'cache' and 'contention'.
The efficient ARC methods like deferred RC approach a tracing GC.
The benefit of RC is predictability (though not always) & RAII. That's why Rust and many C codebases use explicit refcounting when lifetimes are unknown.
- heavenlyblue 6y ago> With better escape analysis in GC languages and better compilers, the gap can be reduced further. While making the compiler slower, contradicting the upside you mention earlier.
- higerordermap 6y agoBetter escape analysis doesn't take much time. Not to mention 70% of optimization can be done in 10% of code and much faster. It is the more exotic optimizations that have diminishing returns for slow compile times.