Fast TypeScript/JavaScript transformer without node-gyp and postinstall script.
| node 10 | node12 | node14 | |
|---|---|---|---|
| Windows x64 | ✅ | ✅ | ✅ |
| macOS | ✅ | ✅ | ✅ |
| Linux x64 | ✅ | ✅ | ✅ |
Fastest TypeScript transformer.
Detail: @swc-node/core
⚠️ Notes:transformSyncAPI in esbuild has huge overhead. Soswcis only faster than esbuild intransformSyncAPI. In thetransformAPI,esbuildis about 1 ~ 1.6x faster thanswc.
transform RxJS
AjaxObservable.tsto ES2015 & CommonJSJavaScript. Benchmark code: bench
Hardware info:
Model Name: MacBook Pro
Model Identifier: MacBookPro15,1
Processor Name: 6-Core Intel Core i7
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 12 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
@swc-node/core x 368 ops/sec ±4.18% (84 runs sampled)
esbuild x 42.16 ops/sec ±1.76% (55 runs sampled)
typescript x 24.52 ops/sec ±14.38% (51 runs sampled)
babel x 22.08 ops/sec ±10.17% (44 runs sampled)
Transform rxjs/AjaxObservable.ts benchmark bench suite: Fastest is @swc-node/core@swc-node/core x 291 ops/sec ±1.66% (78 runs sampled)
esbuild x 454 ops/sec ±3.66% (73 runs sampled)
Transform rxjs/AjaxObservable.ts async benchmark bench suite: Fastest is esbuild@swc-node/core x 946 ops/sec ±2.36% (74 runs sampled)
esbuild x 931 ops/sec ±3.56% (65 runs sampled)
Transform rxjs/AjaxObservable.ts parallel benchmark bench suite: Fastest is @swc-node/core,esbuildFastest jest TypeScript transformer.
Detail: @swc-node/jest
Testing in pure
TypeScriptproject, compile target isES2018. Running withnpx jest --no-cache,ts-jestwas configured withisolatedModules: true
Test Suites: 49 passed, 49 total
Tests: 254 passed, 254 total
Snapshots: 53 passed, 53 total
Time: 54.631 s
Ran all test suites.
✨ Done in 62.71s.
Test Suites: 49 passed, 49 total
Tests: 254 passed, 254 total
Snapshots: 53 passed, 53 total
Time: 10.511 s
Ran all test suites.
✨ Done in 14.34s.
Faster ts-node/register/transpile-only alternative.
Detail: @swc-node/register
[email protected]latestrust@nightlylatest
yarncargo build --release && yarn buildyarn test