4 ms·
One of the things I like about go is that the path of least resistance is straightforward code. Getting a program working and working correctly while being stra
by todd8 8y ago
One of the things I like about go is that the path of least resistance is straightforward code. Getting a program working and working correctly while being straightforward is usually the starting point to getting a correct program that runs fast enough. Go's tools for testing and benchmarking and it's compilation speed make it relatively easy it iterate on a program while tuning it.
This example was really nicely done; it's a classic problem, parsing input data. Some problems, on the other hand, require a different approach. See for example Knuth's wonderful introduction to boolean satisfiability in The Art of Computer Programing, Vol 4B, see [1]. Here the algorithms are really important to performance.
[1] https://www.youtube.com/watch?v=g4lhrVPDUG0 https://www.youtube.com/watch?v=g4lhrVPDUG0