diff options
Diffstat (limited to 'docs/content/en/news/hugo-macos-intel-vs-arm/index.html')
-rw-r--r-- | docs/content/en/news/hugo-macos-intel-vs-arm/index.html | 9139 |
1 files changed, 9139 insertions, 0 deletions
diff --git a/docs/content/en/news/hugo-macos-intel-vs-arm/index.html b/docs/content/en/news/hugo-macos-intel-vs-arm/index.html new file mode 100644 index 000000000..9bc83df5d --- /dev/null +++ b/docs/content/en/news/hugo-macos-intel-vs-arm/index.html @@ -0,0 +1,9139 @@ +--- +title: "Hugo on Apple M1" +date: 2020-12-10 +description: "The new Mac Mini M1 base model is blazing fast! We have run the Hugo benchmarks comparing it to a MacBook four times more expensive." +--- + +<p><i>By <a href="https://github.com/bep/">bep</a></i></p> + +<p> + The table below shows all of Hugo's benchmarks run on both a MacBook with Intel CPU and a Mac Mini M1 with an ARM CPU. +</p> +<p>Some notes: + + <ul> + <li>The Intel Mac is a 2019 16 inch MacBook with 2,3 GHz 8-Core Intel Core i9 with 32 GB ram.</li> + <li>The ARM Mac is a new Mac Mini M1 base model with 8 GB of ram</li> + <li>The benchmarks are run with <code>go test -test.run=NONE -bench="Benchmark" -test.benchmem=true -cpu=8 -count=4 ./...</code>. Since the M1 does not have a concept of Turbo Boost, I kept that on when running the Intel benchmarks.</li> + <li>The right column is the Mac Mini, negative (black) numbers are good, positive numbers (red) are not so good.</li> + <li>Go is compiled from the latest source: <code>go version devel +5627a4dc30 Wed Dec 9 16:57:37 2020 +0000 darwin/arm64</code></li> + </ul> +</p> + +<p> + This test isn't exactly comparing apples with apples (pun intended); this is a 4K USD computer compared to a 1K computer, but that makes the performance of the Mac Mini even more impressive. +</p> + +<p> + There are some areas where the Intel still outshines the ARM, and that is most likely areas with highly optimized assembly code, and this will certainly improve. More benchmarks can be found <a href="https://roland.zone/m1-go-benchmarks/">here</a>. +</p> + +<p> + You probably want to watch <a href="https://github.com/golang/go/issues/42756">issue</a> to track when we can get a Go release with MacOS M1 support. A couple of months? +</p> + +<p> + Also, this <a href="https://docs.google.com/document/d/1iWUstb66v66tTVxQWNMZ1BehgNzEmykzqDCUp5l8ip8/edit">work document</a> is a great resource for getting a native Go development environment up and running on the M1. +</p> + +<h2>Benchstat Output</h2> + +<style> + td { + padding: 10px; + } + + th, + td { + border: none; + } +</style> +<table class="benchstat oldnew" style="border-collapse: collapse; width: 100%"> + <tr class="configs"> + <th style="text-align: left;"></th> + <th> + hugo-intel.txt + </th> + <th> + hugo-m1.txt + </th> + </tr> + <tbody> + <tr> + <th style="text-align: left;"></th> + <th colspan="2" class="metric" style=""> + time/op + </th> + <th style=""> + delta + </th> + </tr> + <tr class="group"> + <th colspan="4" style="text-align: left;"> + github.com/gohugoio/hugo/common/hreflect + </th> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + IsTruthFul-8 + </td> + <td> + 15.0ns ± 3% + </td> + <td> + 12.6ns ± 3% + </td> + <td class="delta" style="font-weight: bold;"> + −16.31% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="group"> + <th colspan="4" style="text-align: left;"> + github.com/gohugoio/hugo/common/maps + </th> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + ScratchGet-8 + </td> + <td> + 15.1ns ± 1% + </td> + <td> + 13.8ns ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −8.74% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="group"> + <th colspan="4" style="text-align: left;"> + github.com/gohugoio/hugo/helpers + </th> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + StripHTML-8 + </td> + <td> + 2.02µs ± 0% + </td> + <td> + 1.61µs ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −20.15% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + TestTruncateWordsToWholeSentence-8 + </td> + <td> + 50.1ns ± 2% + </td> + <td> + 45.1ns ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −9.98% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + TestTruncateWordsToWholeSentenceOld-8 + </td> + <td> + 4.23µs ± 2% + </td> + <td> + 3.15µs ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −25.53% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + TotalWords-8 + </td> + <td> + 6.38µs ± 2% + </td> + <td> + 5.90µs ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −7.63% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + EmojiKyokomiFprint-8 + </td> + <td> + 30.9µs ± 5% + </td> + <td> + 25.1µs ± 3% + </td> + <td class="delta" style="font-weight: bold;"> + −18.83% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + EmojiKyokomiSprint-8 + </td> + <td> + 29.9µs ± 1% + </td> + <td> + 24.3µs ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −18.49% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="worse"> + <td style="text-align: right;padding: 0em 1em;"> + HugoEmoji-8 + </td> + <td> + 1.56µs ±10% + </td> + <td> + 4.27µs ± 3% + </td> + <td class="delta" style="font-weight: bold;color: #c00;"> + +174.22% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="worse"> + <td style="text-align: right;padding: 0em 1em;"> + ReaderContains-8 + </td> + <td> + 4.01µs ± 1% + </td> + <td> + 4.23µs ± 2% + </td> + <td class="delta" style="font-weight: bold;color: #c00;"> + +5.48% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + MD5FromFileFast/full=false-8 + </td> + <td> + 2.36µs ± 1% + </td> + <td> + 1.75µs ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −25.92% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="worse"> + <td style="text-align: right;padding: 0em 1em;"> + MD5FromFileFast/full=true-8 + </td> + <td> + 32.7µs ± 2% + </td> + <td> + 36.3µs ± 0% + </td> + <td class="delta" style="font-weight: bold;color: #c00;"> + +10.85% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + UniqueStrings/Safe-8 + </td> + <td> + 418ns ± 3% + </td> + <td> + 312ns ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −25.42% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + UniqueStrings/Reuse_slice-8 + </td> + <td> + 352ns ± 2% + </td> + <td> + 271ns ± 2% + </td> + <td class="delta" style="font-weight: bold;"> + −23.25% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + UniqueStrings/Reuse_slice_sorted-8 + </td> + <td> + 203ns ± 1% + </td> + <td> + 157ns ± 2% + </td> + <td class="delta" style="font-weight: bold;"> + −22.82% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="group"> + <th colspan="4" style="text-align: left;"> + github.com/gohugoio/hugo/hugofs + </th> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + Walk-8 + </td> + <td> + 271µs ± 1% + </td> + <td> + 210µs ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −22.70% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="group"> + <th colspan="4" style="text-align: left;"> + github.com/gohugoio/hugo/hugofs/glob + </th> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + GetGlob-8 + </td> + <td> + 15.0ns ± 2% + </td> + <td> + 13.8ns ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −8.12% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="group"> + <th colspan="4" style="text-align: left;"> + github.com/gohugoio/hugo/hugolib + </th> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + Cascade/langs-1-8 + </td> + <td> + 7.24ms ± 1% + </td> + <td> + 5.06ms ± 2% + </td> + <td class="delta" style="font-weight: bold;"> + −30.06% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + Cascade/langs-3-8 + </td> + <td> + 9.20ms ± 0% + </td> + <td> + 6.56ms ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −28.75% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + Cascade/langs-5-8 + </td> + <td> + 11.2ms ± 1% + </td> + <td> + 8.0ms ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −28.64% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + Cascade/langs-7-8 + </td> + <td> + 13.4ms ± 1% + </td> + <td> + 9.6ms ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −28.18% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + Cascade/langs-9-8 + </td> + <td> + 15.8ms ± 1% + </td> + <td> + 11.2ms ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −29.20% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + ContentMap/CreateMissingNodes-8 + </td> + <td> + 54.3µs ± 3% + </td> + <td> + 49.9µs ± 5% + </td> + <td class="delta" style="font-weight: bold;"> + −8.03% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + GetPage-8 + </td> + <td> + 210ns ± 2% + </td> + <td> + 207ns ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −1.46% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + GetPageRegular/From_root-8 + </td> + <td> + 1.64µs ± 1% + </td> + <td> + 0.88µs ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −46.14% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + GetPageRegular/Page_relative-8 + </td> + <td> + 1.96µs ± 0% + </td> + <td> + 1.15µs ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −41.52% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="unchanged"> + <td style="text-align: right;padding: 0em 1em;"> + MergeByLanguage-8 + </td> + <td> + 644ns ±15% + </td> + <td> + 599ns ±12% + </td> + <td class="nodelta" style="text-align: center !important;"> + ~ + </td> + <td class="note"> + (p=0.486 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/.Next-pages-300-8 + </td> + <td> + 34.0ns ± 1% + </td> + <td> + 31.3ns ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −7.81% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/.Next-pages-5000-8 + </td> + <td> + 65.5ns ± 2% + </td> + <td> + 38.3ns ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −41.42% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/.Prev-pages-300-8 + </td> + <td> + 34.0ns ± 1% + </td> + <td> + 31.6ns ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −7.00% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/.Prev-pages-5000-8 + </td> + <td> + 65.8ns ± 2% + </td> + <td> + 37.9ns ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −42.37% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.Next-pages-300-8 + </td> + <td> + 911ns ±17% + </td> + <td> + 621ns ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −31.82% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="unchanged"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.Next-pages-5000-8 + </td> + <td> + 1.94µs ± 9% + </td> + <td> + 1.67µs ±11% + </td> + <td class="nodelta" style="text-align: center !important;"> + ~ + </td> + <td class="note"> + (p=0.057 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.Prev-pages-300-8 + </td> + <td> + 854ns ±32% + </td> + <td> + 631ns ± 3% + </td> + <td class="delta" style="font-weight: bold;"> + −26.16% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.Prev-pages-5000-8 + </td> + <td> + 1.98µs ± 4% + </td> + <td> + 1.66µs ± 5% + </td> + <td class="delta" style="font-weight: bold;"> + −16.34% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.Shuffled.Next-pages-300-8 + </td> + <td> + 914ns ±19% + </td> + <td> + 623ns ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −31.83% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.Shuffled.Next-pages-5000-8 + </td> + <td> + 13.6µs ± 1% + </td> + <td> + 11.3µs ± 4% + </td> + <td class="delta" style="font-weight: bold;"> + −17.04% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.Shuffled.Prev-pages-300-8 + </td> + <td> + 952ns ±21% + </td> + <td> + 627ns ± 0% + </td> + <td class="delta" style="font-weight: bold;"> + −34.12% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.Shuffled.Prev-pages-5000-8 + </td> + <td> + 13.1µs ± 1% + </td> + <td> + 11.2µs ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −14.35% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.ByTitle.Next-pages-300-8 + </td> + <td> + 752ns ± 2% + </td> + <td> + 630ns ± 4% + </td> + <td class="delta" style="font-weight: bold;"> + −16.24% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + PagesPrevNext/Pages.ByTitle.Next-pages-5000-8 + </td> + <td> + 13.5µs ± 3% + </td> + <td> + 11.1µs ± 4% + </td> + <td class="delta" style="font-weight: bold;"> + −17.84% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + ResourceChainPostProcess-8 + </td> + <td> + 40.1ms ± 1% + </td> + <td> + 35.6ms ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −11.23% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="worse"> + <td style="text-align: right;padding: 0em 1em;"> + ReplaceShortcodeTokens-8 + </td> + <td> + 2.30µs ±34% + </td> + <td> + 7.02µs ± 3% + </td> + <td class="delta" style="font-weight: bold;color: #c00;"> + +205.66% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + BuildSite/Edit_Bundle_with_image-8 + </td> + <td> + 754µs ± 0% + </td> + <td> + 446µs ± 7% + </td> + <td class="delta" style="font-weight: bold;"> + −40.85% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + BuildSite/Edit_Bundle_with_JSON_file-8 + </td> + <td> + 728µs ± 0% + </td> + <td> + 437µs ± 1% + </td> + <td class="delta" style="font-weight: bold;"> + −39.95% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + BuildSite/Edit_Tags_and_categories-8 + </td> + <td> + 15.5ms ± 2% + </td> + <td> + 12.9ms ± 6% + </td> + <td class="delta" style="font-weight: bold;"> + −16.46% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + BuildSite/Edit_Canonify_URLs-8 + </td> + <td> + 27.1ms ± 2% + </td> + <td> + 25.9ms ± 2% + </td> + <td class="delta" style="font-weight: bold;"> + −4.69% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + BuildSite/Edit_Deep_content_tree-8 + </td> + <td> + 32.2ms ± 5% + </td> + <td> + 25.7ms ± 3% + </td> + <td class="delta" style="font-weight: bold;"> + −20.16% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + BuildSite/Edit_Many_HTML_templates-8 + </td> + <td> + 11.3ms ± 2% + </td> + <td> + 8.5ms ± 2% + </td> + <td class="delta" style="font-weight: bold;"> + −24.98% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> + <td style="text-align: right;padding: 0em 1em;"> + BuildSite/Edit_Page_collections-8 + </td> + <td> + 19.7ms ± 2% + </td> + <td> + 14.5ms ± 3% + </td> + <td class="delta" style="font-weight: bold;"> + −26.11% + </td> + <td class="note"> + (p=0.029 n=4+4) + </td> + </tr> + <tr class="better"> |