> Unfortunately, LEA became very slow in the recent generations of CPUs. Intel doesn’t suggest this will change.
lea is a pretty common instruction even in non-OCaml code so this is annoying. I wonder if this has changed since 2014?
$ objdump -d /usr/bin/ls | grep '\blea\b' | wc -l
908
$ objdump -d /usr/bin/ls | wc -l
21398
4.2% of all instructions, and that's an underestimate because the raw objdump -d output contains blank lines, nops, etc.For an OCaml 4.14 program (/usr/bin/virt-v2v), I got 38886 / 432937 which is 9.0%.
For OCaml 5 using the flambda optimizer, 36531 / 480357 = 7.6%