Branchless Coding in Go
mattnakama.com
Branchless Coding in Go
1–10 of 56 posts
Re: Branchless Coding in Go
#2What if you can use the unsafe package?
Re: Branchless Coding in Go
#3Re: Branchless Coding in Go
#4Re: Branchless Coding in Go
#5Instead of a "minimum wait", could you implement a random wait? Some random number of ns/ms between calls. Something that's enough to make any timing attack measurements unusable?
Re: Branchless Coding in Go
#6Re: Branchless Coding in Go
#7Instead of a "minimum wait", could you implement a random wait? Some random number of ns/ms between calls. Something that's enough to make any timing attack measurements unusable?
Re: Branchless Coding in Go
#8https://github.com/WillAbides/rjson
The generated code isn't much to look at, but it is certainly fast.
https://github.com/WillAbides/rjson/blob/main/object_handler...
Re: Branchless Coding in Go
#9Usual disclaimer: The branch predictor is one of the things that will make your program slower, so keep it in mind, but it's the memory stupid(!) so if the powers that be want a faster program in a few days focus on memory layout and cache usage first.
Re: Branchless Coding in Go
#10I know that branch speculation can be used as an attack vector if our program is the aggressor - but does simply using branches in some way make us more likely to be the victim?