#11148·vitest

[5.0] `bench.compare` no longer shows relative scores

Author: spaceemotionCreated Sep 4, 2026Updated Sep 17, 2026
Labelsfeat: benchmarkp3-minor-bug

Describe the bug

In Vitest v4, the benchmark results showed a little compare list after everything was done, with relative labels like "1.5x". In Vitest v5, the benchmark tables themselves only seem to show "fastest" and "slowest".

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-hsm7fwu6?file=test%2Fbasic.bench.ts

typescript
import { test } from 'vitest';

test('foo bar', async ({ bench }) => {
  await bench.compare(
    bench('foo', () => JSON.stringify(123)),
    bench('bar', () => JSON.stringify({ foo: 'bar', baz: 123 }))
  );
});

System Info

bash
System:
    OS: Linux 6.18 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (24) x64 AMD Ryzen 9 7950X 16-Core Processor
    Memory: 18.22 GB / 23.47 GB
    Container: Yes
    Shell: 3.6.1 - /usr/bin/fish
  Binaries:
    Node: 24.15.0 - /mnt/wslg/runtime-dir/fnm_multishells/70914_1788521686026/bin/node
    npm: 11.12.1 - /mnt/wslg/runtime-dir/fnm_multishells/70914_1788521686026/bin/npm
    pnpm: 11.10.0 - /mnt/wslg/runtime-dir/fnm_multishells/70914_1788521686026/bin/pnpm
  Browsers:
    Chrome: 151.0.7922.71
  npmPackages:
    vitest: catalog: => 5.0.0

Used Package Manager

pnpm

Validations