dmd: enum to!string slows down compilation

Basile B. b2.temp at gmx.com
Tue Dec 29 22:46:26 UTC 2020


On Tuesday, 29 December 2020 at 22:42:16 UTC, kdevel wrote:
> Why is the enum to!string conversion so slow?
>
> ~~~slowenumtostringconversion.d
> private enum S { A, B, C, D, };
>
> [...]

one factor is all the template constraints that are evaluated 
until the right std.conv.to overload gets selected.


More information about the Digitalmars-d-learn mailing list