Lutger:
> writefln does a flush where writef doesn't. On my system (fedora 11) all
> timings are nearly the same however, while writef is actually a bit faster
> than printf. What OS are you on?
I am doing such tests on an unloaded Windows 32 bit XP SP2, on a Core2 at 2 GHz
and 2 GB RAM.
I have done another test for writeln, and indeed it's quite faster than
writefln, it takes 2.45 seconds:
import std.stdio: writeln;
void main() {
const int N = 2_000_000;
for (int i; i < N; i++)
writeln("test ", i);
}
Bye,
bearophile