It’s recommended to set up your editor, so that v fmt -w
runs on every save. A vfmt run is usually pretty cheap (takes <30ms).
Profiling
V has good support for profiling your programs: v -profile profile.txt run file.v
That will produce a profile.txt file, which you can then analyze.
You can sort on column 3 (average time per function) using:
import time
println('Hello world')
}