Below you will find pages that utilize the taxonomy term “Constant Time”
Post
On Constant Time Division
Writing constant time code is hard. We all know that. But I’m always amazed again on how difficult it is. In preparation for making NSS more constant time I looked into certain CPU instructions that are known to be not constant time. So I wrote a little thing to measure the time (CPU cycles) needed for division.
div rcx ; eax is now a/b The CPU I’m using in this post is an Intel i7-4790 (haswell).