Hello, World!
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Mar 29 23:02:23 UTC 2022
On Tue, Mar 29, 2022 at 05:52:14PM +0000, jmh530 via Digitalmars-d wrote:
[...]
> I know it's annoying to endless produce performance comparisons, but
> it would be interesting to see the impact of selective imports and
> whether the imported template as in below has an impact.
> ```
> void main() {
> with(imported!"std.stdio") {
> writeln("Hello, World!");
> }
> }
> ```
Using `with(imported!"std.stdio")`, printing "Hello, World!":
real 0m20.430s
user 0m16.199s
sys 0m4.153s
Basically, indistinguishible from the global `import std.stdio;` case.
(I consider sub-second differences as noise in the measurement, it's not
significant.)
T
--
BREAKFAST.COM halted...Cereal Port Not Responding. -- YHL
More information about the Digitalmars-d
mailing list