tl;dr: Homebrew actually takes several times as long to install packages as Nix does, and uses up way more space despite a less isolated toolchain.

Now that I'm on my Ubuntu system, I can easily test Nix and Homebrew side-by-side.

To make it fair, I've removed almost everything I have installed with Nix, as well as Homebrew. Interestingly, Homebrew is using ~2x as much disk space, and listing my installed packages (none) with Homebrew takes ~30x as long as with Nix:

~
du -hsxc /nix/store /home/linuxbrew
238M /nix/store
584M /home/linuxbrew
822M total

~
time nix profile list

________________________________________________________
Executed in 19.88 millis fish external
usr time 11.21 millis 174.00 micros 11.04 millis
sys time 11.18 millis 141.00 micros 11.04 millis

~
time sudo -H nix profile list
0 flake:nixpkgs#legacyPackages.x86_64-linux.nixFlakes github:NixOS/nixpkgs/b2f2d04f01b3de3abad0dd9bc48ad7a3ee32bbc6#legacyPackages.x86_64-linux.nixFlakes /nix/store/g4xva7x46h5bqqh811n12dzjc7325x21-nix-2.4pre20210326_dd77f71
1 flake:nixpkgs#legacyPackages.x86_64-linux.starship github:NixOS/nixpkgs/b2f2d04f01b3de3abad0dd9bc48ad7a3ee32bbc6#legacyPackages.x86_64-linux.starship /nix/store/5n36vabqg701l9nji30m1r004zcy4q0w-starship-0.51.0

________________________________________________________
Executed in 29.91 millis fish external
usr time 27.30 millis 380.00 micros 26.92 millis
sys time 4.72 millis 283.00 micros 4.43 millis

~
time brew list
==> Formulae

________________________________________________________
Executed in 881.81 millis fish external
usr time 527.24 millis 411.00 micros 526.83 millis
sys time 173.15 millis 298.00 micros 172.85 millis

Homebrew takes about twice as long to search for packages related to Libreoffice (results omitted to HN won't tell me this post is too long):

~
time nix search nixpkgs libreoffice >/dev/null

________________________________________________________
Executed in 554.37 millis fish external
usr time 537.39 millis 434.00 micros 536.95 millis
sys time 16.44 millis 289.00 micros 16.15 millis

~
time brew search libreoffice >/dev/null

________________________________________________________
Executed in 1.33 secs fish external
usr time 578.16 millis 0.00 micros 578.16 millis
sys time 124.57 millis 367.00 micros 124.20 millis

I had some trouble looking for large packages to install with Homebrew and Nix for comparison. It seems that GUI apps (Libreoffice, Firefox, etc.) tend to be packaged exclusively as casks for Homebrew, which means they don't exist on Linux. So instead, I selected a handful of packages from the Linux formulas list[1] that I figured would pull in a substantive dependency closure. Apparently there's no bottle for Crystal, so it took a very long time to install because it had to compile from source. Prior to that, though, installation crashed because of a ulimits issue when ‘pouring the bottle’ for LLVM:

~
time brew install imagemagick bat feh crystal python mruby
==> Downloading https://ghcr.io/v2/linuxbrew/core/zlib/manifests/1.2.11
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/linuxbrew/core/zlib/blobs/sha256:6f604280b9e056da163b81cef3076b2e39bbd2b8d3cc8c36d27c19c472c760a4
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:6f604280b9e056da163b81cef3076b2e39bbd2b8d3cc8c36d27c19c472c760a4?se=20
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/linuxbrew/core/libpng/manifests/1.6.37
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/linuxbrew/core/libpng/blobs/sha256:c5d219b27780c730af50693110ed2c79e50200d3595c7e395998fe3950354ec9
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c5d219b27780c730af50693110ed2c79e50200d3595c7e395998fe3950354ec9?se=20
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/linuxbrew/core/bzip2/manifests/1.0.8-1
######################################################################## 100.0%
<snip>
==> Installing crystal dependency: llvm@9
==> Pouring llvm@9--9.0.1_5.x86_64_linux.bottle.tar.gz
Error: Too many open files @ rb_sysopen - /home/linuxbrew/.linuxbrew/Cellar/llvm@9/9.0.1_5/bin/llvm-jitlink

________________________________________________________
Executed in 600.02 secs fish external
usr time 203.24 secs 479.00 micros 203.24 secs
sys time 70.80 secs 313.00 micros 70.80 secs

I decided to re-run the brew install command, but skip Crystal, which only took a few more seconds:

~
time brew install imagemagick bat feh python mruby
<snip>
==> Installing mruby
==> Pouring mruby--3.0.0.x86_64_linux.bottle.tar.gz
/home/linuxbrew/.linuxbrew/Cellar/mruby/3.0.0: 323 files, 14.7MB

________________________________________________________
Executed in 20.18 secs fish external
usr time 9.56 secs 0.00 micros 9.56 secs
sys time 3.06 secs 761.00 micros 3.06 secs

I left Crystal in when I tested Nix, since I knew it would be no problem, and Nix was done in ~36 seconds, meaning Homebrew ~17x the time, skipping one package entirely.

After the two install operations, Homebrew was using several more gigabytes of storage than Nix:

du -hsxc /nix/store /home/linuxbrew
2.0G /nix/store
4.9G /home/linuxbrew
6.8G total

I'll reply to this comment with a ‘warmed-up’ test of installing a single additional package, as well. But it seems pretty clear already that it's misleading at best to characterize Homebrew as faster than Nix.

—

1: https://formulae.brew.sh/formula-linux/