Remix.run Logo
PaulKeeble 3 hours ago

Likewise. Wasting user space CPU cycles is actually a moderately tricky thing to do when we have optimising compilers. Its not something that comes up a lot but it is occasionally something you do need to do in order to test other things and it is different to making a lot of system calls.

I think volatile is usually fairly well contained I can't immediately think of an obvious case where it could adjust the performance of the calling context indirectly but its pushing the problem onto that cache coherence part of the CPU so its not quite the same as an algorithm that consumes all the memory bandwidth or execution ports. Lots of little interesting trade offs in the weeds of this and other potential solutions depending on if any of this matters.

ai-christianson 2 hours ago | parent [-]

The "stress" command is pretty good for this.