You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std.typecons: Make Nullable.toString always a template (dlang#10767)
Because some overloads of Nullable!T.toString are not templates,
instantiating a Nullable!T also always instantiates formatValue!T, and
all of its dependencies.
For large type hierarchies, this can add a significant amount of
compilation overhead.
We can avoid this by making remaining overloads of Nullable!T.toString
templates as well, similar to Tuple.
Timings from internal motivating use case:
Before:
9.00user 1.38system 0:10.57elapsed 98%CPU (0avgtext+0avgdata 5851516maxresident)k
21968inputs+48144outputs (0major+1468687minor)pagefaults 0swaps
After:
5.11user 0.61system 0:05.75elapsed 99%CPU (0avgtext+0avgdata 2762392maxresident)k
0inputs+34528outputs (0major+685900minor)pagefaults 0swaps
0 commit comments