---
title: "Benchmarks"
locale: "zh"
version: "1.x"
canonicalUrl: "https://farmfe.org/zh/docs/1.x/benchmark"
publicationStatus: "prerelease"
---

<a id="benchmarks"></a>
# Benchmarks


<a id="introduction"></a>
## Introduction


Using Turbopack's bench cases (1000 React components), see https://turbo.build/pack/docs/benchmarks.


<a id="run-this-benchmark-yourself"></a>
### Run this benchmark yourself


> Test Repo：https://github.com/farm-fe/performance-compare
> 
> 
> Test Machine（Linux Mint 21.1 Cinnamon�?11th Gen Intel© Core�?i5-11400 @ 2.60GHz × 6�?15.5 GiB�?


<a id="install-dependencies"></a>
#### Install dependencies


**npm**

```sh
npm install
```

**pnpm**

```sh
pnpm install
```

**yarn**

```sh
yarn install
```

**bun**

```sh
bun install
```


<a id="run-benchmark"></a>
#### run benchmark


**npm**

```sh
npm benchmark
```

**pnpm**

```sh
pnpm benchmark
```

**yarn**

```sh
yarn benchmark
```

**bun**

```sh
bun benchmark
```


<a id="data"></a>
### Data


|  | **Startup** | **HMR (Root)** | **HMR (Leaf)** | **Production Build** |
| --- | --- | --- | --- | --- |
| Webpack | 8035ms | 345ms | 265ms | 11321ms |
| Vite | 3078ms | 35ms | 18ms | 2266ms |
| Rspack | 831ms | 104ms | 96ms | 724ms |
| Farm | 403ms | 11ms | 10ms | 288ms |



---


<a id="metrics"></a>
## metrics


- Cold StartUp Time: The time it takes to develop a build without caching
- Hot StartUp Time: The time it takes to develop a build with caching
- Cold Production Build Time: The time it takes to build a production build without caching
- Hot Production Build Time: The time it takes to build a production build with caching
- HMR Time: The time it takes to apply an update to a file and send it to the development server to the response
  
  
  - HMR Root: The time for updating a react component file that has no dependency
  - HMR Leaf: The time for updating a root react component, normally it is named ` App.tsx ` or ` index.tsx `


<a id="benchmark-for-all-metrics"></a>
### Benchmark for all metrics


![](</img/20231204223204.png>)
<a id="benchmark-of-hmr"></a>
### Benchmark of HMR


![](</img/hmr-linux.png>)
<a id="benchmark-of-startup"></a>
### Benchmark of Startup


![](</img/startup-linux.png>)
<a id="benchmark-of-production-build"></a>
### Benchmark of Production Build


![](</img/build-linux.png>)
