Homebrew on Apple Silicon Macs is surprisingly not slower than on Intel, and can often be faster, because the core compilation tools are now native and highly optimized.

Let’s see Homebrew in action. Imagine you want to install htop, a popular process viewer. On an M1 Mac, this is what you’d typically see:

% brew install htop
==> Fetching etag for htop
==> Fetching htop
==> Downloading https://ghcr.io/v2/homebrew/core/htop/manifests/3.2.2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:d1c721002602785a8856b01440b4c7e52207e28866e581a7825534c48f877249
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d1c721002602785a8856b01440b4c7e52207e28866e581a7825534c48f877249?se=2024-02-29T23%3A00%3A00Z&sig=V5M9lF5hO34uWd5l99f9uQ%3D%3D&sp=r&sv=2021-08-06&sr=b&oc=3&skoid=a440e978-475f-40a7-90f1-7734a7f20219&sktid=8a097022-4a59-44f8-895f-001710d8d58e&skt=2024-02-29T15%3A37%3A54Z&ske=2024-03-07T15%3A37%3A54Z&sks=b&skv=2021-08-06&rscc=application%2Foctet-stream&rscd=attachment&rsct=application%2Foctet-stream
######################################################################## 100.0%
==> Verifying htop
==> Running htop
==> Caveats
To install the `bash-completion` for htop, run:
  brew install bash-completion
  echo '[[ -r "/opt/homebrew/etc/bash_completion.d/htop" ]] && . "/opt/homebrew/etc/bash_completion.d/htop"' >> ~/.bash_profile

==> Summary
🍺  /opt/homebrew/Cellar/htop/3.2.2: 11 files, 1.0MB, built in 15 seconds

Notice the path /opt/homebrew/Cellar/htop/3.2.2. This is the standard installation location for Homebrew on Apple Silicon, distinct from the /usr/local path used on Intel Macs. This separation is key to avoiding conflicts and ensuring native execution.

The problem Homebrew on Apple Silicon solves is running compiled software efficiently on the ARM architecture. Historically, developers had to choose between maintaining separate Intel and ARM builds or relying on Rosetta 2 for emulation. Homebrew, by default, now compiles packages from source using native ARM compilers (like Clang) when you install them on an M1/M2 Mac. This means the software runs directly on the Apple Silicon processor, leveraging its performance advantages without the overhead of emulation.

The core of Homebrew’s optimization for Apple Silicon lies in its formula definitions and the build environment it sets up. When you run brew install <package>, Homebrew checks if a pre-compiled "bottle" (a binary package) is available for your architecture (arm64_monterey, arm64_ventura, etc.). If a bottle exists, it’s downloaded and installed, which is very fast. If not, Homebrew falls back to compiling from source. For native Apple Silicon Macs, this compilation process uses clang and make which are themselves native ARM executables. The Homebrew build system is configured to pass the correct architecture flags and use the native toolchain.

The primary levers you control are:

  1. Installation Prefix: Homebrew installs to /opt/homebrew on Apple Silicon. This is managed automatically and is crucial for keeping your system clean and ensuring native binaries are used. You generally don’t need to change this.
  2. Formulae: These are Ruby scripts that tell Homebrew how to download, compile, and install software. Homebrew’s core team actively maintains formulae to ensure they build correctly on Apple Silicon.
  3. Bottles: These are pre-compiled binary packages. Homebrew prioritizes installing bottles as they are much faster than compiling from source. You can influence this by explicitly telling Homebrew to compile if you suspect an issue with a bottle, using brew install --build-from-source <package>.
  4. Rosetta 2: While Homebrew aims to use native binaries, some older or less-maintained packages might still require Rosetta 2. Homebrew will often detect this and prompt you to install Rosetta if needed. You can also explicitly force compilation of a package to be universal (supporting both Intel and ARM, which might use Rosetta for the Intel part) or for a specific architecture, though this is rarely necessary for typical use.

The one thing most people don’t know is that Homebrew’s bottle system for Apple Silicon is incredibly sophisticated. It doesn’t just build a single arm64 binary. Instead, it builds architectures specific to macOS versions (e.g., arm64_monterey, arm64_ventura, arm64_sonoma). This allows for finer-grained optimizations and compatibility. When you install a package, Homebrew selects the most appropriate bottle for your OS version, ensuring you get the best performance and stability without manual intervention. This means a package installed on Monterey might have a slightly different binary than the same package installed on Sonoma, even if both are for arm64.

The next step in optimizing your Homebrew experience on Apple Silicon is understanding how to manage dependencies and potential conflicts between packages, especially when dealing with formulae that have complex build requirements.

Want structured learning?

Take the full Homebrew course →