While running automation scripts on my Mac Mini, the constant bottleneck in my workflow was the time spent installing Python packages. Whether starting a new project or updating an existing environment, those few seconds of waiting added up—especially with larger packages like polars, which has a distribution file of around 40MB. To reclaim this lost productivity, I decided to test uv, a Rust-based Python package manager designed to replace pip and venv.
How much faster is uv compared to pip?
To get a realistic benchmark, I ran the same setup five times on my Mac Mini to calculate the average. The process involved creating a fresh virtual environment and installing polars. With pip, environment creation took 1.202 seconds and installation took 2.338 seconds, totaling 3.54 seconds. Using uv version 0.11.6, the environment was ready in 0.150 seconds and installation finished in 0.383 seconds, totaling 0.533 seconds.
This makes uv roughly 6.6 times faster than pip. Looking at virtual environment creation alone, the drop from 1.202 seconds to 0.150 seconds is an 8-fold increase in speed. For developers who frequently tear down and rebuild test environments or start new projects, these saved seconds accumulate into minutes of reclaimed focus.
How do I install and use uv?
Installation is straightforward via Homebrew. If you haven't installed Homebrew yet, run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once Homebrew is ready, install uv with a single command:
brew install uv
Verify the installation by running uv --version. The tool is designed to be intuitive; you essentially just prefix your usual commands with uv. To create a virtual environment in the current folder, use uv venv. To install packages, use uv pip install. For example, to install polars, the workflow is:
uv venv
source .venv/bin/activate
uv pip install polars
Keep in mind that virtual environments created via uv venv do not actually contain pip. If you try to run python -m pip install out of habit, you will encounter a No module named pip error. Simply remember that every command should start with uv.
Does updating uv version significantly increase speed?
I wondered if staying on the absolute latest version of uv provided a noticeable performance boost. To test this, I compared uv 0.11.6 and uv 0.12.11 under the exact same conditions. The total time for uv 0.11.6 was 0.533 seconds, while uv 0.12.11 clocked in at 0.511 seconds.
The difference is negligible. This suggests that the primary performance gain occurs when switching from pip to uv, rather than when updating between uv versions. You don't need to obsessively chase every minor update for the sake of speed.
These measurements were verified against raw data stored in publish/_archive/uv-polars-bench/uv_rebench.json. Once you make the switch, you save time on every single installation.
It is a simple change that keeps your workflow uninterrupted.
Originally published at Homelab Notes — notes from one Mac mini running local LLMs and 24/7 automation.
Top comments (0)