Skip to content

Add CodSpeed performance benchmarks#1

Draft
codspeed-hq[bot] wants to merge 3 commits intomainfrom
codspeed-wizard-1771681233518
Draft

Add CodSpeed performance benchmarks#1
codspeed-hq[bot] wants to merge 3 commits intomainfrom
codspeed-wizard-1771681233518

Conversation

@codspeed-hq
Copy link

@codspeed-hq codspeed-hq bot commented Feb 21, 2026

Summary

  • Added CodSpeed continuous performance benchmarking to track the TypeScript compiler's performance over time.
  • Created 9 benchmarks covering the core compiler pipeline: scanner, parser, and transpile operations, each tested at small, medium, and large input sizes.
  • Integrated with CI via a dedicated GitHub Actions workflow using CodSpeed's simulation mode for reproducible measurements.

Changes

  • benches/compiler.bench.mts: Benchmark suite using vitest bench, exercising ts.createScanner, ts.createSourceFile, and ts.transpileModule with TypeScript source inputs of varying complexity.
  • vitest.config.mts: Vitest configuration with the @codspeed/vitest-plugin for CodSpeed integration.
  • .github/workflows/codspeed.yml: GitHub Actions workflow that builds the compiler and runs benchmarks on every push to main and on pull requests, using OIDC authentication.
  • package.json / package-lock.json: Added vitest and @codspeed/vitest-plugin as dev dependencies.
  • README.md: Added CodSpeed badge.

Next steps

  • Merge this PR to establish baseline performance measurements on main.
  • Future PRs will automatically receive performance reports comparing against the baseline.
  • Additional benchmarks can be added to benches/ to cover more compiler operations (e.g., type checking, declaration emit).
  • Visit the CodSpeed dashboard to explore results and configure performance checks.

@codspeed-hq codspeed-hq bot force-pushed the codspeed-wizard-1771681233518 branch from b5f39c1 to bcae73c Compare February 21, 2026 14:02
@codspeed-hq codspeed-hq bot force-pushed the codspeed-wizard-1771681233518 branch from da77fac to 94b2afa Compare February 21, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants