ANTIGRAVITY LABJP
Articles/Tips & Best Practices
Tips & Best Practices/2026-06-14Intermediate

Turning 'the Antigravity CLI feels faster' into a number with hyperfine

The Go-based Antigravity CLI feels snappier to start. Here is how to turn that impression into a reproducible number with hyperfine: warm vs cold runs, cumulative cost in automation, and a CI gate that catches regressions.

antigravity-cli3hyperfinebenchmark2performance11automation39

Premium Article

When Gemini CLI and the Code Assist extension wind down on June 18, I moved my whole scheduled stack off gemini and onto the Antigravity CLI. The first thing I noticed was vague: it felt quicker to hand control back to the terminal. I half-expected that, since the tool is now a single Go binary. But an impression is just an impression. As an indie developer automating updates across four sites (Dolice Labs), the CLI gets launched dozens of times a day. If startup shifts by 0.4 seconds, that is not noise at my volume. I wanted to convert the feeling into a number anyone can reproduce.

Why time antigravity --version doesn't really measure anything

The first instinct is usually this naive measurement:

time antigravity --version
# antigravity 2.0.3
# antigravity --version  0.18s user 0.04s system 88% cpu 0.249 total

That 0.249 s blends several unrelated things: the shell resolving PATH and spawning the process, the OS reading the binary off disk (slow on the very first run), and the trivial work of printing a version string. Worse, it is a single sample. Run it again and the OS file cache is warm, so it returns in 0.08 s. Which one is the "real" startup time?

The honest answer is that you need both, depending on intent. For scheduled jobs that hammer the same binary back to back, the warm median is closest to reality. For a tool you rarely launch, or the very first invocation after a deploy, the cold path is what bites. Naive time makes neither distinction and takes one sample, so it isn't a measurement at all.

Capturing the warm distribution with hyperfine

That is what hyperfine is for. It is a Rust benchmarking tool that handles warmup runs, repeated sampling, statistics, and outlier warnings for you.

# macOS
brew install hyperfine
# Debian/Ubuntu
sudo apt install hyperfine

Start with warm startup latency:

hyperfine --warmup 5 --runs 50 \
  'antigravity --version' \
  'gemini --version'

--warmup 5 runs the command five times before measuring to warm the cache, and --runs 50 takes fifty samples. On my machine (M2 / macOS 15) the result looked like this. These are environment-dependent reference numbers — read the ratio, not the absolute values.

Benchmark 1: antigravity --version
  Time (mean ± σ):      28.4 ms ±   2.1 ms
  Range (min … max):    25.9 ms …  34.7 ms    50 runs

Benchmark 2: gemini --version
  Time (mean ± σ):     186.3 ms ±   9.4 ms
  Range (min … max):   171.2 ms … 208.5 ms    50 runs

Summary
  'antigravity --version' ran 6.56 ± 0.61 times faster than 'gemini --version'

Now "feels faster" is roughly 6.5x. That is a believable gap. A Node-based CLI boots a Node runtime and loads its dependency modules on every launch; a single Go binary carries almost none of that overhead. Because we measured the trivial --version path, what we are seeing here is pure process-start cost.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
How to measure CLI startup latency in warm vs cold conditions and separate it from model response time
How to estimate the real cumulative cost of startup time when automation invokes the CLI dozens of times a day
How to turn a vague 'it feels faster' into a reproducible benchmark and a p95-threshold CI gate
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Tips2026-04-30
Fixing Antigravity's Slow Performance and Broken File Watching on WSL2
If Antigravity feels sluggish on WSL2, ignores your saved files, or takes minutes to start, you're almost certainly hitting a WSL2 filesystem boundary issue. Here's how to diagnose and fix it for good.
Tips2026-04-21
Antigravity Uses Too Much CPU and Memory: A Practical Fix Guide
When your laptop fans spin up and Antigravity holds several gigabytes of RAM, the fix starts by identifying which subprocess is actually misbehaving. Here's a per-process playbook.
Tips2026-04-14
Maximizing Antigravity Performance with Gemma 4: A Practical Guide
Master Gemma 4 performance optimization in Antigravity with response speed tuning, cost reduction strategies, and complete implementation patterns for API and local execution.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →