Skip to content

grego/ssg-bench

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Static site generator benchmarks

Benchmarking static site generators can hardly be made accurate. They come with different feature sets and scopes. Their performance may depend a lot on disk busyness and other external factors.

Here, just a little attempt is made. Blades, Zola and Hugo (the self-proclaimed "world’s fastest framework for building websites") are compared. They use the same theme (based on BOOTSTRA.386), tailored for each, with pages that have the same content (as far as possible). Feel free to browse the code, judge how representative it is and suggest improvements for more fairness and accuracy. The internal measurement of time for each program is used and is parsed from the output.

Results

AMD Ryzen 9 5900X @ 3.7GHz, 12 physical cores, NVMe

blades: .91674 ms (±.09523), median = 0.915 ms
zola: 19.79000 ms (±.47528), median = 20 ms
hugo: 23.69000 ms (±1.21404), median = 24 ms

Intel Core i5-2400S @ 2.66GHz, 4 physical cores, HDD:

blades: 2.49836 ms (±.26011), median = 2.265 ms
zola: 58.75000 ms (±5.31379), median = 54 ms
hugo: 54.91304 ms (±19.44189), median = 48 ms

Intel Core i5-3230M @ 2.60GHz, 2 physical cores, SSD:

blades: 2.63907 ms (±.21769), median = 2.645 ms
zola: 49.95000 ms (±2.32540), median = 49 ms
hugo: 53.23000 ms (±2.45297), median = 53 ms

Rockchip 3399, 2+4 physical cores, eMMC:

blades: 10.11564 ms (±1.26302)
zola: 242.10000 ms (±18.54804)
hugo: 223.52000 ms (±27.17921)

Running

Run bench.sh to run the benchmarks. You need to have ripgrep and bc installed.

The default number of iterations is 100. You can edit it in bench.sh.

Ad Blades

Compared to the other two, Blades is a young hobby project, aiming at possibly different, simpler feature set. It could be rightfully claimed that this may provide an unfair advantage in this comparison, since even if the generator Y doesn't use the feature X here (all features like that were attempted to be disabled), it makes its architecture inherently more complex.

To counter this, Blades has one feature enabled that the others lack: generating image galleries. That means it needs to generate nearly twice as many (9 vs 5) regular pages than the others and the page template is a little more complex.

Nevertheless, the results should still be taken with a grain of salt and a consideration of all of this.

About

An attempt to benchmark static site generators

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published