M1 10x faster than Intel at integral division, throughput one 64-bit divide in two cycles

claptrap clap at trap.com
Thu May 13 23:58:55 UTC 2021


On Thursday, 13 May 2021 at 12:06:01 UTC, Witold Baryluk wrote:
> On Thursday, 13 May 2021 at 11:58:50 UTC, Witold Baryluk wrote:
>> On Thursday, 13 May 2021 at 01:59:15 UTC, Andrei Alexandrescu 
>> wrote:
>>
> I just tested, using his benchmark code, on my a bit older AMD 
> Zen+ CPU, that is clocked 2.8GHz (so actually slower than 
> either M1 or the tested Xeon):
>
> I got 1.156ns per u32 divide using hardware divide. If I 
> normalize this to 3.2GHz, it becomes 1.01ns.
>
> 0.399ns (or 0.349ns normalized to 3.2GHz) when using 
> `libdivide`. So exactly same speed as M1 (0.351ms).

Zen3 is about 2 to 3 times faster than Zen1 for both latency and 
throughput of 32/64 idiv. So if your results are accurate, Zen3 
is 2 or 3 times faster than the M1.





More information about the Digitalmars-d mailing list