56 points stmonty 3 hours ago 6 comments
eigenblake 1 hour ago | parent
jandrewrogers 1 hour ago | parent
C/C++ code can trivially reach into some remote bit of state and mutate it directly. The compiler rarely objects, no matter how ugly the access method or pattern. It is up to the programmer to make sure the invariants hold and the compiler can’t always see through it. These elided copies add up, though it usually has a maintainability and safety cost.
It is related to why functional languages tend to be mediocre for supercomputing in practice despite having nice properties for massive parallelism in theory.
whilenot-dev 20 minutes ago | parent
Are there any common resources for this kind of access methods and patterns that specifically aim to bridge the soft-/hardware gap? The best one I can come up with is Performance Analysis and Tuning on Modern CPUs[0] by Denis Bakhvalov.
jeffbee 50 minutes ago | parent
antonvs 24 minutes ago | parent
jdw64 49 minutes ago | parent