4 ms·
>Projects where you need to think about memory are a pretty small percentage of projects. Performance matters in every project, and the way you get performance
by fasterik 3y ago
>Projects where you need to think about memory are a pretty small percentage of projects.
Performance matters in every project, and the way you get performance on modern processors is by using the cache effectively. That requires a certain amount of control over memory layout and access.
It's not so much about what's possible in a given language, it's about what features you're using and what features are getting in the way. Sure, you can write a bunch of unsafe Rust, but at what point are you fighting against the language and adding unnecessary friction?
- eternityforest 3y agoThe way you get performance on modern processors is to use libraries that use the cache effectively for the stuff that actually eats CPU. High level languages are good at enabling high level optimizations like caching and special case handling of things, which might be a bigger gain than anything to do with memory layouts except in a few inner loops. High performance and reasonably focused low complexity stuff might be a good fit for C, until compilers get even better. But in a web browser? I guess time will tell, but my guess is the ability to more effectively manage complexity will let people do more high level optimizations with less fear of buffer overflows from more code. Things like "In this specific case I can fall back to this very simple plaintext rendering for this one section" might save more CPU than "We made all rendering a bit faster" especially if you just keep doing the performance critical stuff in C.