Uncalled functions in hello world
Basile B.
b2.temp at gmx.com
Wed Apr 8 14:08:23 UTC 2020
On Wednesday, 8 April 2020 at 13:57:47 UTC, Stefan Koch wrote:
> The current phobos hello world
> import std.stdio;
> void main() { "Hello World".writeln; }
> generates a list of 36 functions which are generated and
> emitted but not called, and therefore presumably only used at
> compile time
>
> Those are:
>
> [...]
>
> So you can see that there is something to be won even in the
> most trivial examples if we have facilities to disable codegen
> for functions which are only used at compiletime.
Are you sure that this is not also caused by bad speculative
template instantiation ?
In case I'd use the wrong wording, I mean "some function
templates that are wrongly determined to be emitted ".
More information about the Digitalmars-d
mailing list