2 ms·
If the language spec says a piece of code must execute in constant-time, any deviation is a compiler bug. But yes, that may mean the language can’t be implemen
by Someone 4y ago
If the language spec says a piece of code must execute in constant-time, any deviation is a compiler bug.
But yes, that may mean the language can’t be implemented well on lots of modern hardware.
A lot probably can be done by avoiding some instructions, flushing caches very often, clearing branch prediction history (if possible), etc.
That would not make the language win performance shootouts, though.
There also is the problem that not all cores may be equal and that quite a few modern CPUs drop speed ‘at will’, depending on system load, core temperature, etc.