Comment

Comment by Genbox

Agner's table[1] for Intel IceLake/TigerLake shows FDIV to have higher latency, but slightly better throughput.

For latency:

- DIV/IDIV r32: 12 cycles

- DIV/IDIV r64: 15 cycles

- FDIV: 14–16 cycles

Throughput:

- DIV/IDIV r32: 6 cycles

- DIV/IDIV r64: 10 cycles

- FDIV: 4–5 cycles

I didn't check for a more recent CPU.

[1] https://www.agner.org/optimize/instruction_tables.pdf page 366 & 369

parent Genbox 2 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton