4 ms·
You're grouping carries. If you have 13 spare bits, you can accumulate 13 additions before you have to take care of carries. Then you have to add some overhead
by tspiteri 6y ago
You're grouping carries. If you have 13 spare bits, you can accumulate 13 additions before you have to take care of carries. Then you have to add some overhead for bit manipulation, but the article's point is that the parallelism gains more than make up for the bit manipulation.
- asciimov 6y agoRight, am not saying that this isn't faster, I am saying you aren't reducing to total number of carries.
- tspiteri 6y agoYou are reducing the number of carries. The article explains it clearly. If you're not convinced by the article, I won't try to convince you. (Edit: the last thing I'll add: you are reducing the number of carries for 64-bit additions. When adding 13 51-bit numbers, that does not count as carries instruction-wise, as it's still add, not adc.)
- asciimov 6y agoI see what I was doing wrong, I was considering total bit carries during the addition, ie... 1+1= 10 and is a one bit carry, and not the carry operation done after overflowing the word boundary. Next time, I'll keep from reading tech articles while running on too little sleep. Thanks for your understanding.
- tspiteri 6y agoNo worries, I kinda realized just after posting the comment, which explains why I added the edit. :)