dmd -run speed trends

Witold Baryluk witold.baryluk at gmail.com
Mon Dec 25 16:47:20 UTC 2023


On Tuesday, 19 December 2023 at 02:11:24 UTC, Walter Bright wrote:
> Thank you! But I'm a little confused. I'm not sure if the times 
> posted are runtime or compile time. I'm interested in the 
> runtime difference between writefln() and printf().
>
> This is because with the next version of Phobos, I'd like 
> performance issues of writefln() addressed.

As Siarhei Siamashka mentioned, this post and thread are about 
compile time. I think post I care zero about runtime performance. 
The whole test program finishes in few milliseconds. Compared to 
100-1000ms of compilation time.


If IO performance is critical, I use my custom IO library, which 
bypasses phobos and libc completely (talking directly to kernel), 
has custom formatting, type conversions, optimized buffering 
methods, zero copy interfaces, and no GC. But obviously it would 
be nice to improve Phobos itself, as it is a decent match for 
generic applications.



More information about the Digitalmars-d mailing list