Nice. How much of the improvement is "algorithmic", versus just being written in a more efficient language?
The improvement is due to two factors, with the first being by far the biggest factor:
1. Hugo no longer has to call an external `pygmentize` tool for every highlight. This removes the overhead of the fork/exec, as well as the (not-insignificant) overhead of the Python interpreter starting up.
2. Go is generally a faster language than Python.
The caveat with 2 is that Python can spend large amounts of time in C, eg. doing regex matching.