Good practices for I/O
Avoid string interpolation for I/O
When writing data to a file (or other I/O device), forming extra intermediate strings is a source of overhead. Instead of:
println(file, "$a $b")
use:
println(file, a, " ", b)
When writing data to a file (or other I/O device), forming extra intermediate strings is a source of overhead. Instead of:
use: