More benchmarking

This section will measure the performance of WCbuffered.go and WCshared.go using the handy time(1) utility. However, this time, instead of presenting a graph, I will give you the actual output of the time(1) utility:

$ time go run WCshared.go /tmp/*.data /tmp/*.data
real  0m31.836s
user  0m31.659s
sys   0m0.165s
$ time go run WCbuffered.go /tmp/*.data /tmp/*.data
real  0m31.823s
user  0m31.656s
sys   0m0.171s

As you can see, both utilities performed equally well, or equally badly if you prefer! However, apart from the speed of a program, what also matters is the clarity of its design and how easy it is to make code changes to it! Additionally, the presented way also times the compile times of both utilities, which might make the ...

Get Go Systems Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.