Why is Hugo so fast?

I am very impressed at the 5000 posts in 6 seconds capablities of Hugo.

I was wandering what actually makes Hugo this fast?? especially when compared to other static site generators?

Hugo is compiled and most other SSGs are interpreted. Plus, some serious crazy thought has gone in to making it run efficiently and concentrate on what functionality is implemented to help keep it fast.

It’s compiled, but also, It’s Go.

I think it would be much harder to get up to speed if we tried to implement this in C or C++. Go’s Goroutines are a perfect match for many of the tasks that Hugo performs on every build. Have a look at the CPU usage on your PC while building.

But “doing work” takes time in any language, and in 0.13 we added a lot of new features (work), so we had to spend some time performance tuning to get the pages/second down to the 0.12 level, and even faster in some cases. Go’s profilers and benchmark tools work perfect for this.

It will be interesting to see what (positive) impace this commit has on Hugo speed:

1 Like