3 ms·
> So, yes, it takes time to read from memory. That's why we try to avoid allocations as much as possible. This whole thing is summed up by some pretty basic ph
by bob1029 8mo ago
> So, yes, it takes time to read from memory. That's why we try to avoid allocations as much as possible.
This whole thing is summed up by some pretty basic physics. What you actually want to minimize is the communication of information between physical cores. Nothing else really matters. Certainly not terminology or clever tricks that effectively try to cheat thermodynamics. The cost of communicating information is almost always much more substantial than the cost of computing over that same information. The ALU is not nearly as power hungry as infinity fabric.
- chuzz 8mo agoAlways wondered if it is possible/useful to model multi core CPU caches as CISC cores where the complex instructions are all the operations you can do with the L1 within the time frame of an L2 access
- mgaunard 8mo agoWhat the hell do allocations even have to do with time to read from memory... It seems all of these Rust performance warriors have no understanding of computer architecture fundamentals.
- menaerus 8mo agoIt's not rust per se. It's a human trait. People make uneducated assumptions about the topics all of the time, and it's completely normal since your have to bootstrap yourself somehow to be able to grow further. It's impossible to know everything. And it's also a difficult situation because you do have to arrive to some conclusion. I do think, though, that in this particular case, assumptions made are a little bit all over the place and the tone is overconfident.
- hinkley 8mo agoIf an allocation falls in a forest and never gets written to, did it really happen? We don’t allocate things we don’t write to. Maybe if the question sounds stupid then you didn’t appreciate it, instead of other people being stupid.
- pjmlp 8mo agoIn the old Windows NT days, the scheduler still wasn't that clever, so in multiple core servers it would throw processes around thrashing the whole cache and CPU context. By pinning the processes to specific CPUs, the performance gains were quite visible.
- hrmtst93837 8mo ago[flagged]