Skip to content

Commit

Permalink
feat(docs): add initial benchmark tables
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Mar 8, 2023
1 parent 545dff0 commit 2bbd261
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions README.md
Expand Up @@ -22,6 +22,56 @@ your workflows such that you never have to worry about whether your
> considered much more than a tech demo or proof of concept. Do not use in
> production yet.
### Benchmarks

Even at this early stage, orogene is **very** fast. These benchmarks are all
on ubuntu linux running under wsl2, with an ext4 filesystem.

All benchmarks are ordered from fastest to slowest (lower is better):

#### Warm Cache

This test shows performance when running off a warm cache, with an existing
lockfile. This scenario is common in CI scenarios with caching enabled, as
well as local scenarios where `node_modules` is wiped out in order to "start
over" (and potentially when switching branches).

Of note here is the contrast between the subsecond (!) installation by
orogene, versus the much more noticeable install times of literally everything
else.

| Package Manager | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:|
| `orogene` | 417.3 ± 43.3 | 374.6 | 524.8 | 1.00 |
| `bun` | 1535.2 ± 72.5 | 1442.3 | 1628.9 | 3.68 ± 0.42 |
| `pnpm` | 8285.1 ± 529.0 | 7680.4 | 9169.9 | 19.85 ± 2.42 |
| `yarn` | 20616.7 ± 1726.5 | 18928.6 | 24401.5 | 49.41 ± 6.59 |
| `npm` | 29132.0 ± 4569.2 | 25113.4 | 38634.2 | 69.81 ± 13.13 |

#### Cold Cache

This test shows performance when running off a cold cache, but with an
existing lockfile. This scenario is common in CI scenarios that don't cache
the package manager caches between runs, and for initial installs by
teammates on relatively "clean" machines.

| Package Manager | Mean [s] | Min [s] | Max [s] | Relative |
|:---|---:|---:|---:|---:|
| `bun` | 5.203 ± 1.926 | 3.555 | 9.616 | 1.00 |
| `orogene` | 8.346 ± 0.416 | 7.938 | 9.135 | 1.60 ± 0.60 |
| `pnpm` | 27.653 ± 0.467 | 26.915 | 28.294 | 5.31 ± 1.97 |
| `npm` | 31.613 ± 0.464 | 30.930 | 32.192 | 6.08 ± 2.25 |
| `yarn` | 72.815 ± 1.285 | 71.275 | 74.932 | 13.99 ± 5.19 |

#### Caveat Emptor

At the speeds at which orogene operates, these benchmarks can
vary widely because they depend on the underlying filesystem's performance.
For example, the gaps might be much smaller on Windows or (sometimes) macOS.
They may even vary between different filesystems on Linux/FreeBSD. Note that
orogene uses different installation strategies based on support for e.g.
reflinking (btrfs, APFS, xfs).

### Building

#### Requirements
Expand Down

0 comments on commit 2bbd261

Please sign in to comment.