Blogs / Personal blogs

Wojciech Muła

0x80.pl

Popular posts
5
Total points
861
HN comments
282
Rank
#2,630 personal

Visit 0x80.pl → On Hacker News Mar 2016 – Jun 2025

Software Engineering 5Systems & Performance 4Math & Algorithms 1

3

Dividing unsigned 8-bit numbers

Division is quite an expensive operation. For instance, latency of the 32-bit division varies between 10 and 15 cycles on the Cannon Lake CPU, and for Zen4 this range is from 9 to 14 cycles. The latency of 32-bit multiplication is 3 or 4 cycles on both CPU models.