Our template emission strategy is broken
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 11 10:02:01 PST 2015
On 11/11/2015 12:13 PM, David Nadlinger wrote:
> On Wednesday, 11 November 2015 at 15:07:15 UTC, Andrei Alexandrescu wrote:
>> Phobos takes about 600MB max to build.
>
> When was the last time you did "dmd -unittest -main $(find std -name
> '*.d')"? On current master, dmd takes just below 9 GiB to complete the
> build.
"Then don't do that". Seriously, I agree reducing memory consumed is
necessary but there are always extreme cases to construct.
> Also, consider that many of the features in Phobos – apart from the
> underlying molasses consisting of std.traits and friends – are not
> really widely used internally. This is not surprising, considering that
> large parts of std.* are mostly a grab-bag of orthogonal stuff, and the
> unit tests are, as they should, fairly isolated. For example, how many
> Phobos modules actually use std.regex internally, let alone its
> compile-time variants (which we are quick to advertise)? What about
> range "pipelines" longer than the one or two stages you'd typically
> write in a unit test?
My perception is Phobos uses its own dog food intensively, which also
leads to the criticisms that everything in Phobos depends on everything
else. That said, clearly the library + unittests themselves are not a
large project using the library.
> Apologies for maybe being a bit too confrontational about this,
There is agreement that a problem exists. No need to get overly carried
over this; I recall last time you got really upset, you said something
that was so incredibly offensive, Walter and I had to hold a pow-wow and
decide to simply ignore it and just give you time to calm down. There's
no need or time for all that. We're on the same boat.
> but I
> don't think anybody is helped by dismissing entire classes of problems
> just because they tend not to be so apparent from a library writer's
> perspective. If you were to, say, visit the folks at Weka, you might be
> surprised to see how easy it is to do the latter without even realizing so.
Agreed. Glad you're helping them out!
Andrei
More information about the Digitalmars-d
mailing list