bioinfornatics:
I mean if one way is more efficient by speed?
To be sure of what's faster you often have to write small benchmarks.
In this case this should be good:
import std.stdio, std.array;
void main() {
writefln("%-(%s\n%)", ["hello"].replicate(5));
}
But if you want speed this is is probably faster:
import core.stdc.stdio: puts;
void main() {
puts("hello\nhello\nhello\nhello\nhello");
}
Bye,
bearophile
