Home

Awesome

performance-compare

Benchmarks for Farm, Rsbuild, Webpack, Vite

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

The startup time algorithm is the compilation time plus the time from browser loading to page rendering on the browser

[!IMPORTANT] Tips: Farm compiled a write with incremental cache for the first time, The time to write the cache in the current warehouse module configuration is approximately 200ms, Rsbuild currently has no caching mechanism, so we provide second pass compilation data by default Later, we can wait for rspack to implement incremental caching and then we can re-separate the entire data,(the second compilation with caching and the first compilation without caching)

<!-- > Tested on Linux Mint, 11th Gen Intel(R) Core(TM) i5-11400 @ 2.60GHz, 16GB -->

Tested on Macos M1 Pro

frameworkstartupserverStartTimeonLoadTimerootHmrleafHmrbuildTime
Farm 1.3.22481ms322ms159ms32ms44ms651ms
Farm 1.3.22 (Hot)258ms120ms138ms27ms45ms210ms
Rsbuild 1.0.5417ms250ms167ms82ms85ms320ms
Rsbuild 1.0.5 (Hot)382ms210ms172ms111ms74ms280ms
Vite 6.0.0-alpha (swc)1716ms142ms1574ms114ms123ms1260ms
Vite 6.0.0-alpha (swc)(Hot)1077ms114ms963ms34ms17ms1340ms
Vite 6.0.0-alpha (babel)2838ms126ms2712ms28ms28ms1390ms
Vite 6.0.0-alpha (babel)(Hot)2563ms111ms2452ms138ms122ms1310ms
Webpack 5.91.0 (swc)1926ms1591ms335ms588ms158ms4144ms
Webpack 5.91.0 (swc)(Hot)851ms557ms294ms242ms216ms483ms
Webpack 5.91.0 (babel)5607ms5307ms300ms226ms171ms460ms
Webpack 5.91.0 (babel)(Hot)1083ms827ms256ms260ms163ms481ms

Full Benchmark

xx

StartUp Benchmark

xx

HMR Benchmark

xx

Production Build Benchmark

xx

Run benchmarks:

node benchmark.mjs

You will see something like:

bright@bright-MS-7D17:~/opensource/performance-compare$ node benchmark.mjs

Rspack  startup time: 417ms
Turbopack  startup time: 2440.673095703125ms
Webpack  startup time: 7968ms
Vite  startup time: 3712ms
Farm  startup time: 430ms
Turbopack  Root HMR time: 7ms
Farm  Root HMR time: 7ms
Vite  Root HMR time: 42ms
Rspack  Root HMR time: 298ms
Webpack  Root HMR time: 451ms
Farm  Leaf HMR time: 10ms
Turbopack  Leaf HMR time: 11ms
Vite  Leaf HMR time: 22ms
Webpack  Leaf HMR time: 284ms
Rspack  Leaf HMR time: 303ms

If you want to start the project with the specified tool, try:

pnpm i # install dependencies

npm run start # Start Farm
npm run start:vite # Start Vite
npm run start:webpack # Start Webpack
npm run start:rspack # Start Rspack
npm run start:turbopack # Start Turbopack