Skip to content

Commit 9c38202

Browse files
committed
docs: update Benchmark in README.md
1 parent 183d9a8 commit 9c38202

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,37 @@ oxc-angular-compiler/
246246

247247
## Benchmarks
248248

249-
The compiler achieves significant performance improvements over the official TypeScript-based Angular compiler. Benchmarks are available in `napi/angular-compiler/benchmarks/`.
249+
### Bitwarden Web Vault (Cold Production Build)
250+
251+
Measured on Apple M3 Max (16 cores, 128 GB RAM), Node.js 22.22.0, 3 iterations averaged.
252+
253+
| Builder | Average | Speedup |
254+
| ---------------------------- | --------- | --------- |
255+
| Vite + OXC Angular Compiler | **4.55s** | **20.7x** |
256+
| Webpack + `@ngtools/webpack` | 1m 34.2s | baseline |
257+
258+
### Running Benchmarks
259+
260+
```bash
261+
cd napi/angular-compiler/benchmarks/bitwarden
262+
263+
# Install dependencies
264+
pnpm install
265+
266+
# Run full benchmark (cold + incremental, 3 iterations)
267+
pnpm benchmark
268+
269+
# Cold build only
270+
pnpm benchmark --cold
271+
272+
# Vite/OXC only (no baseline comparison)
273+
pnpm benchmark --vite-only
274+
275+
# Custom iteration count
276+
pnpm benchmark --iterations=5
277+
```
278+
279+
See `napi/angular-compiler/benchmarks/` for additional benchmark targets.
250280

251281
## Contributing
252282

napi/angular-compiler/benchmarks/bitwarden/benchmark.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ async function runViteBuild(verbose: boolean): Promise<BenchmarkResult> {
274274
async function runWebpackBuild(verbose: boolean): Promise<BenchmarkResult> {
275275
log("Running Webpack build (bitwarden's build:oss)...", 'yellow')
276276

277-
// Check if pnpm is available in bitwarden
278-
const result = await runCommand('pnpm', ['run', 'build:oss'], BITWARDEN_WEB, verbose)
277+
const result = await runCommand('npm', ['run', 'build:oss'], BITWARDEN_WEB, verbose)
279278

280279
const { size, fileCount } = getDirectorySize(WEBPACK_DIST)
281280

napi/angular-compiler/benchmarks/bitwarden/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { resolve, dirname } from 'node:path'
22
import { fileURLToPath } from 'node:url'
33

44
// Use our local vite-plugin implementation
5-
import { angular } from '@oxc-angular/vite/vite-plugin'
5+
import { angular } from '@oxc-angular/vite'
66
import { defineConfig, type UserConfig } from 'vite'
77
import wasm from 'vite-plugin-wasm'
88
import tsconfigPaths from 'vite-tsconfig-paths'

0 commit comments

Comments
 (0)