Profiling DMD's Compilation Time with dmdprof
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu Nov 8 18:24:59 UTC 2018
On Thu, Nov 08, 2018 at 06:25:06PM +0100, Jacob Carlborg via Digitalmars-d-announce wrote:
> On 2018-11-08 05:16, Manu wrote:
>
> > 4 seconds? That's just untrue. D is actually kinda slow these
> > days... In my experience it's slower than modern C++ compilers by
> > quite a lot.
>
> This is my result on macOS:
>
> $ $ make -f posix.mak clean
> $ time make -f posix.mak -j 16
> real 0m3.127s
> user 0m5.478s
> sys 0m1.686s
[...]
Result on Debian/Linux (amd64):
real 0m8.445s
user 0m11.088s
sys 0m1.453s
Slower than C++ compilers?! That's impossible. There must be something
wrong with your setup, or else with your OS. Dmd is easily one of the
fastest compilers I've ever used, even after the noticeable slowdown
when we started bootstrapping from D. G++, for example, is at least an
order of magnitude slower. On my system, anyway. YMMV obviously.
(Of course, it depends on what D features you use... template-heavy and
CTFE-heavy code tends to slow it down pretty badly. But still, it's
pretty fast compared to g++.)
T
--
Who told you to swim in Crocodile Lake without life insurance??
More information about the Digitalmars-d-announce
mailing list