|
|
|
|
|
by boricj
13 days ago
|
|
In my experience (embedded systems), most C++ developers aren't even aware of caches, let alone NUMA. They just std::map and AoS and dynamic dispatch everywhere and then grumble "100% CPU usage" when troubleshooting performance problems with top. They might reach for a profiler once all hope is lost, but wouldn't know what to make of performance counters if I showed them some. People who have mechanical sympathy are the exception, not the norm. Now, if I were to design a NUMA-aware programming model, I would probably expose paired processors and memory pools. Then, create threads assigned to processors and hand them an allocator, like how Zig manages memory allocations. Sadly, a global heap (malloc/new) and nothing else is standard and that's one of the many, many legacies of 1970s Unix and POSIX we might not be able to get rid of... Most code nowadays either uses it directly or has bespoke hoops to let the user supply a different heap. |
|