D generates large assembly for simple function

Stefan Koch uplink.coder at googlemail.com
Sat Jan 27 19:43:50 UTC 2018


On Saturday, 27 January 2018 at 19:42:01 UTC, Matt wrote:
> Godbolt link: https://godbolt.org/g/t5S976
The actual code is :
  imul edi, edi
  mov eax, edi
  ret


The rest is runtime initialization.
which you can remove using an undocumented -betterC switch.


More information about the Digitalmars-d-learn mailing list