Modern C++ Lamentations

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 2 04:13:03 UTC 2019


On Tue, Jan 01, 2019 at 11:57:26AM +0000, kinke via Digitalmars-d wrote:
> On Tuesday, 1 January 2019 at 09:44:40 UTC, Jacob Carlborg wrote:
> > On 2018-12-31 16:51, H. S. Teoh wrote:
> > > Note the order of magnitude difference in size, and that ldc2
> > > achieves this by default, with no additional options needed.
> > > 
> > > How do you make dmd produce the same (or comparable) output?
> > 
> > For me I get comparable output with DMD and LDC
> 
> You guys are most likely comparing apples to oranges - H. S. using
> some distro-LDC preconfigured to link against shared druntime/Phobos,
> while LDC usually defaults to the static libs.

Aha!  I think you hit the nail on the head.  `ldd` revealed that the LDC
binary has dynamic dependencies on libphobos2-ldc-shared.so and
libdruntime-ldc-shared.so.  So that explains that.

So that's one less reason to ditch dmd... but still, I'm tempted,
because of overall better codegen with ldc, esp. with compute-intensive
code.


T

-- 
What are you when you run out of Monet? Baroque.


More information about the Digitalmars-d mailing list