[Issue 17093] gdc compilation performance on the Raspbery Pi leaves to be desired

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jan 16 13:46:23 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17093

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at gdcproject.org

--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Any comparative examples of C vs. D would be useful.  If it's slow on Raspi,
then it'll be slow on any other host system, just not as pronounced.

Assuming you mean time to compile, could be any of three components which it's
spending most of it's time in.

1) Compiler:
  If here, try compiling with -v -ftime-report -ftime-report-details, and we'll
see if there's any semantic / pass that it is taking longer than others.

2) Assembler:
  If here, then it's not a bug, and you've just underestimated just how much
code is generated.  Here's a contrived example: https://goo.gl/Ya6lXB

3) Linker:
  Again, it's not a bug.  But chances am you are linking to druntime/phobos
statically, this is would be a very IO and CPU intensive on a poor Raspi.
Compiling with -shared-libphobos should sort that out and bring you back up to
speed with gcc.  (Debian turns on -shared-libphobos by default, but in upstream
for now it is still default disabled while it undergoes more testing).

--


More information about the Digitalmars-d-bugs mailing list