The Weird Concept of Branchless Programming
sanixdk.xyz
The Weird Concept of Branchless Programming
1–10 of 92 posts
Re: The Weird Concept of Branchless Programming
#2Re: The Weird Concept of Branchless Programming
#3The video also showcases a much more impressive branchless speedup: computing CRC checksums. Doing this naïvely with an if-statement for each bit is ~10x slower than doing it branchless with a single bitwise operation for each bit. The author of the article should consider showcasing this too, since it's a lot more impressive than the measly 1.2x speedup highlighted in the article. I assume the minimal/nonexistent speedups in the article are due to modern CPU branch prediction being quite good. But branch predictors inherently fail miserably at CRC because the conditional is on whether the input bit is 1 or 0, which is essentially random.
Re: The Weird Concept of Branchless Programming
#4When you get to think about branchless programming, especially for SIMD optimizations in the real world, you always learn a lot and it’s as if you get a +1 level on your algorithmic skills. The hardest part then is make sure the tricks are clearly laidout so that someone else can take it from here next time
Re: The Weird Concept of Branchless Programming
#5Re: The Weird Concept of Branchless Programming
#6Article doesn’t mention this, but I’d consider neural networks a form of branchless programming. It’s all a bunch of multiply and threshold operations.
Re: The Weird Concept of Branchless Programming
#7Re: The Weird Concept of Branchless Programming
#8Re: The Weird Concept of Branchless Programming
#9Article doesn’t mention this, but I’d consider neural networks a form of branchless programming. It’s all a bunch of multiply and threshold operations.
Thresholding requires branching no?