template statistics
Stefan Koch
uplink.coder at googlemail.com
Wed Jun 3 14:10:21 UTC 2020
On Wednesday, 3 June 2020 at 14:04:23 UTC, Adam D. Ruppe wrote:
> On Wednesday, 3 June 2020 at 03:19:37 UTC, Walter Bright wrote:
>> [...]
>
> iff it is a string literal and only a string literal. tho the
> zero-terminator can be fixed with fwrite of course.
>
>> [...]
>
> It actually tries to special-case string literals (and it does
> a fine job - the compile time on my computer is scarcely
> different than using `core.stdc.stdio`), but turns out this is
> trickier than it might seem since there's a lot of edge cases
> in real generic D code.
>
> On Linux, this generic implementation costs about 0.04s in
> compile time. On Windows, it costs about 0.08s (which is
> probably more the cost of importing core.sys.windows.windows
> than anything else).
>
> tbh I think this case looks worse than it is.
Try to print an enum please.
More information about the Digitalmars-d
mailing list