Open DonaldTsang opened 5 years ago
Hmm those look interesting!
TBH I don't know which would be faster. In traditional architectures, this would be faster, but with the instruction scheduling and specialized math units these days, there'd be no way to tell without actually profiling...
Take a look at https://github.com/ridiculousfish/libdivide
Since 85*3 = 255, why not divmod 255 first? My idea would be
Would this make the calculation faster (if implemented in C)?