Re:Clang vs. Clang
by saalweachter on Sunday August 04, 2024 @09:02AM
(#41153249)
Why not just specify "all branches of this code must execute in the same amount of time", and let the compiler figure it out for the architecture being compiled for?
[ Parent
| on HN ]
Re:Clang vs. Clang
by davrosthedalek on Sunday August 04, 2024 @10:56AM
(#41153943)
Instruction duration isn't constant even within the same arch.
You cannot have branches in constant-time code.
I do wonder though how often cpu instructions have data-dependent execution times....
Re:Clang vs. Clang
by davrosthedalek on Sunday August 04, 2024 @05:57PM
(#41156600)
(Correction: You cannot have data-dependent branches. You can of course have branches to make a fixed-iterations for loop, for example)