D is our last hope
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Fri Dec 22 00:57:33 UTC 2023
On 22/12/2023 12:04 PM, Walter Bright wrote:
> On 12/21/2023 7:13 AM, Siarhei Siamashka wrote:
>> Its main selling point is the compilation speed. However the
>> out-of-the-box performance of `rdmd helloworld.d` is very far from
>> perfect and looks inferior compared to `go run helloworld.go`.
>
> It's a good point. One of the likely suspects is object.d. It started
> out as a small, single file. But it has bloated up to biblical
> proportions, which have to be compiled by every separately compiled D
> module. (If all the modules to a project are presented on the same
> command line, object.d only gets compiled once, and that effort is
> amortized over the other modules.)
>
> For example, object.d has unit tests in it. Unit tests are a great
> feature of D, but there they are in the wrong place. object.d should be
> split into object.d and object.di. The unit tests and definitions go in
> object.d, the declarations go in object.di.
I want to see a significant chunk of object.d removed.
I have a proposal on how to proceed on this, I have already talked with
Adam Wilson about it, so even if you don't hear from me directly you'll
hear from him about it ;)
This isn't just for speeding imports up, it will also help custom
druntime implementers quite significantly (as in, they'll stop
complaining entirely).
More information about the Digitalmars-d
mailing list