3 ms·
We are not removing branches. To fix this in hardware without software changes you would have to disable branch prediction. That would perform worse than what
by pizlonator 9y ago
We are not removing branches.
To fix this in hardware without software changes you would have to disable branch prediction. That would perform worse than what we are doing.
- Game_Ender 9y agoSorry maybe I missed something but you had some really cool techniques to avoid using branches to do things like array length checks and type checks? So you replaced an if branch with a new, potentially slower, and harder to understand concept. I was not trying to imply you removed all branches. It is a really cool piece of engineering but we can still be sad we have to implement it. (On the hardware side I was assuming sommeone clever at Intel will come up with some security non Perf killing change to make branches trustable again).
- pizlonator 9y agoNow we are doing both bounds check branches and index masking. The index masking is purely additive. We didn't replace branches. Similarly, where we use pointer poisoning, it is in addition to some other security check, which is almost always a branch.
- iainmerrick 9y agoAlso, security aside, removing (mispredicted) branches is a legitimate way to try to speed up code!