I’ve started noticing articles and YouTube videos touting the benefits of branchless programming, making it sound like this is a hot new technique (or maybe a hot old technique) that everyone should be using. But it seems like it’s only really applicable to data processing applications (as opposed to general programming) and there are very few times in my career where I’ve needed to use, much less optimize, data processing code. And when I do, I use someone else’s library.
How often does branchless programming actually matter in the day to day life of an average developer?
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.
Hope you enjoy the instance!
Follow the wormhole through a path of communities !webdev@programming.dev
One of the reasons I love Go is that it makes it very easy to collect profiles and locate hot spots.
The part that seems weird to me is that these articles are presented as if it’s a tool that all developers should have in their tool belt, but in 10 years of professional development I have never been in a situation where that kind of optimization would be applicable. Most optimizations I’ve done come down to: I wrote it quickly and ‘lazy’ the first time, but it turned out to be a hot spot, so now I need to put in the time to write it better. And most of the remaining cases are solved by avoiding doing work more than once. I can’t recall a single time when a micro-optimization would have helped, except in college when I was working with microcontrollers.
Please please please, God, Allah, Buddha, any god or non god out there, please don’t let any engineer bringing up branchless programming for a AWS lambda function in our one-function-per-micro-service f*ckitechture.