From 791c826e17cc49935a7c661e214e5a1786eb0e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 20 Dec 2022 12:56:17 +0200 Subject: [PATCH] move TLDR upwards --- README.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index d179a82..becf1c1 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,24 @@ The test Compiles 64 small binaries with [bazel-zig-cc][1] and [llvm14][2]. The tests were run on an x86_64 8-core machine running Ubuntu 22.04. +TLDR +---- + +Extracting the fastest meaningful benchmarks in all categories (from the +section below): + + 'bazel build --experimental_reuse_sandbox_directories //...' ran + 2.77 ± 0.08 times faster than 'bazel build --extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux --experimental_reuse_sandbox_directories //...' + 2.85 ± 0.07 times faster than 'bazel build --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28 --experimental_reuse_sandbox_directories //...' + +This demonstrates that **adding a hermetic toolchain to a project caused 177% +slowdown on this project**. Note that we are not counting `llvm_toolchain//...` +as a real toolchain -- one needs a sysroot to compile anything meaningful +anyway (which zig bundles with the compiler). + +Once we have determined that a hermetic C++ toolchain is required, bazel-zig-cc +is about 2.8% slower than its contender plain llvm14. + Results ------- @@ -105,21 +123,6 @@ Explanation: recommended with both bazel-zig-cc and a nontrivial sysroot. As a result, this is the most important benchmark to look at. - -Extracting the fastest meaningful benchmarks in all categories: - - 'bazel build --experimental_reuse_sandbox_directories //...' ran - 2.77 ± 0.08 times faster than 'bazel build --extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux --experimental_reuse_sandbox_directories //...' - 2.85 ± 0.07 times faster than 'bazel build --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28 --experimental_reuse_sandbox_directories //...' - -This demonstrates that **adding a hermetic toolchain to a project caused 177% -slowdown on this project**. Note that we are not counting `llvm_toolchain//...` -as a real toolchain -- one needs a sysroot to compile anything meaningful -anyway (which zig bundles with the compiler). - -Once we have determined that a hermetic C++ toolchain is required, bazel-zig-cc -is about 2.8% slower than its contender plain llvm14. - Flame graphs and discussion ---------------------------