Following the discussion at
https://github.com/dlang/phobos/pull/5916, we realized that
there's quite some overhead in importing some Phobos modules.
Ideally importing a Phobos module without using it, should be
cost-free (i.e. pay for what you use).
Test case: consider a file with `import std.X` and compile it
with `dmd -c -o-`.
A quick overview of the worst of the worst:
std.regex 1.03s
std.net.curl 0.28s
std.concurrency 0.23s
std.encoding 0.18s
std.zip 0.16s
std.path 0.14s
std.file 0.14s
std.mmfile 0.14s
std.datetime 0.14s
std.socket 0.12s
std.string 0.10s
std.uni 0.09s
std.process 0.05s
This following discussions have already brought a huge
improvements to its light:
https://github.com/dlang/phobos/pull/5931
Can you do a another one?