Compile speed
This is how long the Rust addon, the WebAssembly build and the TypeScript implementation take to compile the same JSX modules to the DOM target, from the package's…
This is how long the Rust addon, the WebAssembly build and the TypeScript implementation take to compile the same JSX modules to the DOM target, from the package's README. The medians are of repeated runs, each contender in its own Node.js process after a warm-up.
| Input | TypeScript implementation | Rust addon | vs TS | WebAssembly | vs TS |
|---|---|---|---|---|---|
| 1 component (110 lines, 7 KiB) | 2.05 ms | 0.20 ms | 10.4x | 0.38 ms | 5.4x |
| 50 components (3,830 lines, 199 KiB) | 56.9 ms | 6.0 ms | 9.5x | 11.7 ms | 4.9x |
| 1,000 components (101,316 lines, 5.1 MiB) | 1,662 ms | 162 ms | 10.2x | 300 ms | 5.5x |
| 200 modules of 10 components, one after the other | 2,793 ms | 268 ms | 10.4x | 269 ms | 10.4x |
the same 200 modules, compileAsync on all cores |
70 ms | 40x |