Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Benchmarking "Homebrew via Barrel" against Homebrew

aydwi edited this page Aug 7, 2022 · 5 revisions

Barrel ultimately is a tool which invokes brew commands in a shell. In doing so, it tries to make sure that its own overhead is negligible. I ran a few benchmarks using hyperfine on a Macbook Air (2020), M1 with target architecture x86_64, and the results indicate that using Homebrew via Barrel is virtually indistinguishable from using Homebrew directly. Networked and disk I/O intensive brew commands are not used for benchmarking due to their inherent unpredictability during execution.

Configuration used:

Homebrew:

macOS: 12.5-x86_64
HOMEBREW_VERSION: 3.5.8
HEAD: ff9c2500195cc357d4a06f99d462f8d8a5d37892
Homebrew Ruby: 2.6.8
CPU: octa-core 64-bit westmere

Homebrew via Barrel (Ext):

macOS: 12.5-x86_64
Compiler: Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.6.0
Build command: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -isystem /Users/aydwi/Projects/barrel/install/include -O3 -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -std=gnu++20 -o CMakeFiles/Ext.dir/main.cpp.o -c /Users/aydwi/Projects/ext/main.cpp"

Benchmark #1

Executing the command brew config 100 times.

Homebrew

Homebrew

Barrel

Homebrew via Barrel

Benchmark #2

Executing the command brew list 100 times.

Screen Shot 2022-08-07 at 09 51 30

Homebrew

Screen Shot 2022-08-07 at 10 06 59

Homebrew via Barrel