Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Node.js/v8 compile caching via entrypoint shims #59720

Merged
merged 8 commits into from
Sep 26, 2024

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Aug 22, 2024

This makes use of nodejs/node#54501 by converting our larger entrypoints (tsc, tsserver, typingsInstaller) into shims which call require("node:module").enableCompileCache(), then require the actual code. Our entrypoints are assumed to always be run in Node (or a compatible runtime), so this is safe.

This gives roughly a 2.5x startup time boost.

Benchmark 1: node ./built/local/_tsc.js --version
  Time (mean ± σ):     122.2 ms ±   1.5 ms    [User: 101.7 ms, System: 13.0 ms]
  Range (min … max):   119.3 ms … 132.3 ms    200 runs
 
Benchmark 2: node ./built/local/tsc.js --version
  Time (mean ± σ):      48.4 ms ±   1.0 ms    [User: 34.0 ms, System: 11.1 ms]
  Range (min … max):    45.7 ms …  52.8 ms    200 runs
 
Summary
  node ./built/local/tsc.js --version ran
    2.52 ± 0.06 times faster than node ./built/local/_tsc.js --version
Benchmark 1 (83 runs): node ./built/local/_tsc.js --version
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           120ms ± 1.43ms     118ms …  128ms          2 ( 2%)        0%
  peak_rss           75.1MB ±  648KB    74.6MB … 79.3MB          2 ( 2%)        0%
  cpu_cycles          486M  ± 3.27M      479M  …  499M           2 ( 2%)        0%
  instructions        658M  ±  265K      658M  …  659M           0 ( 0%)        0%
  cache_references   10.0M  ±  192K     9.45M  … 10.7M           2 ( 2%)        0%
  cache_misses       1.19M  ±  122K     1.00M  … 1.64M           1 ( 1%)        0%
  branch_misses      3.05M  ± 8.76K     3.01M  … 3.07M           1 ( 1%)        0%
Benchmark 2 (208 runs): node ./built/local/tsc.js --version
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          48.1ms ± 1.23ms    45.5ms … 52.7ms          5 ( 2%)        ⚡- 60.0% ±  0.3%
  peak_rss           64.7MB ±  448KB    63.1MB … 66.9MB         20 (10%)        ⚡- 13.9% ±  0.2%
  cpu_cycles          166M  ± 3.95M      159M  …  183M           4 ( 2%)        ⚡- 65.8% ±  0.2%
  instructions        231M  ±  597K      230M  …  233M           2 ( 1%)        ⚡- 64.9% ±  0.0%
  cache_references   7.37M  ±  151K     7.08M  … 7.77M           0 ( 0%)        ⚡- 26.4% ±  0.4%
  cache_misses        666K  ±  133K      465K  … 1.13M           2 ( 1%)        ⚡- 43.8% ±  2.8%
  branch_misses       949K  ± 9.10K      930K  …  978K           2 ( 1%)        ⚡- 68.9% ±  0.1%
Benchmark 1: echo '{"seq": 1, "command": "status"}' | node ./built/local/_tsserver.js --disableAutomaticTypingAcquisition
  Time (mean ± σ):     206.0 ms ±   8.5 ms    [User: 176.2 ms, System: 24.4 ms]
  Range (min … max):   194.8 ms … 250.7 ms    200 runs
 
Benchmark 2: echo '{"seq": 1, "command": "status"}' | node ./built/local/tsserver.js --disableAutomaticTypingAcquisition
  Time (mean ± σ):      83.8 ms ±   1.8 ms    [User: 66.9 ms, System: 18.1 ms]
  Range (min … max):    80.9 ms …  92.4 ms    200 runs
 
Summary
  echo '{"seq": 1, "command": "status"}' | node ./built/local/tsserver.js --disableAutomaticTypingAcquisition ran
    2.46 ± 0.12 times faster than echo '{"seq": 1, "command": "status"}' | node ./built/local/_tsserver.js --disableAutomaticTypingAcquisition

Gotchas:

  • VS Code or other clients who consume us but trim unused files will need to be updated to ensure to include _tsc.js, _tsserver.js, _typingsInstaller.js
  • People who patch our package will break until their packages are updated (yarn).
  • I have not added this to our libraries. It would be weird for that to start caching someone else's process, and it's not clear how one would even do it with an ESM based API.

@jakebailey jakebailey marked this pull request as draft August 22, 2024 19:32
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 5.7.0 milestone Aug 23, 2024
@jakebailey jakebailey marked this pull request as ready for review August 28, 2024 23:26
@jakebailey
Copy link
Member Author

nodejs/node#54501 was merged into Node, so this API should end up available in a later version. I've marked this PR as ready for review, if we want to think about whether or not it's worth the extra shim / indirection.

@jakebailey
Copy link
Member Author

jakebailey commented Aug 30, 2024

Based on the design meeting, this seems like a good idea. Before we do this we'll need to make sure downstream users (@mjbvz, @zkat) know these new files will exist and cannot be deleted.

That and patchers will break until they know to patch _tsc.js (or whatever name we choose).

let output = options.output;
if (options.enableCompileCache) {
const originalOutput = output;
output = path.join(path.dirname(output), "_" + path.basename(output));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just an expedient name choice; I can also remove the extension and then make it like tsc_.js which may sort better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to say that _tsc tab-completes better on the command-line, though, because it doesn't interfere with types<TAB> -- but there's so much stuff in built/local that it doesn't actually make a difference.

@jakebailey
Copy link
Member Author

@typescript-bot test startup-only [email protected],[email protected]

@jakebailey
Copy link
Member Author

@typescript-bot perf test startup-only [email protected],[email protected]

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 17, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test startup-only [email protected],[email protected] ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v20.17.0, x64)
Execution time 151.05ms (± 0.17%) 151.78ms (± 0.16%) +0.73ms (+ 0.48%) 150.97ms 157.09ms p=0.000 n=600
tsserver-startup - node (v20.17.0, x64)
Execution time 295.36ms (± 0.29%) 295.29ms (± 0.29%) ~ 287.31ms 299.45ms p=0.276 n=600
tsserverlibrary-startup - node (v20.17.0, x64)
Execution time 228.41ms (± 0.11%) 228.33ms (± 0.12%) -0.08ms (- 0.04%) 227.46ms 233.35ms p=0.000 n=600
typescript-startup - node (v20.17.0, x64)
Execution time 227.09ms (± 0.11%) 227.16ms (± 0.13%) +0.07ms (+ 0.03%) 226.16ms 232.30ms p=0.005 n=600
tsc-startup - node (v22.8.0, x64)
Execution time 150.94ms (± 0.15%) 77.21ms (± 0.24%) 🟩-73.73ms (-48.85%) 76.67ms 81.80ms p=0.000 n=600
tsserver-startup - node (v22.8.0, x64)
Execution time 292.90ms (± 0.33%) 156.89ms (± 0.40%) 🟩-136.01ms (-46.44%) 149.46ms 159.39ms p=0.000 n=600
tsserverlibrary-startup - node (v22.8.0, x64)
Execution time 280.01ms (± 0.30%) 279.93ms (± 0.30%) -0.08ms (- 0.03%) 272.29ms 284.21ms p=0.018 n=600
typescript-startup - node (v22.8.0, x64)
Execution time 279.74ms (± 0.30%) 279.82ms (± 0.32%) +0.09ms (+ 0.03%) 272.14ms 283.32ms p=0.000 n=600
System info unknown
Hosts
  • node (v20.17.0, x64)
  • node (v22.8.0, x64)
Scenarios
  • tsc-startup - node (v20.17.0, x64)
  • tsserver-startup - node (v20.17.0, x64)
  • tsserverlibrary-startup - node (v20.17.0, x64)
  • typescript-startup - node (v20.17.0, x64)
  • tsc-startup - node (v22.8.0, x64)
  • tsserver-startup - node (v22.8.0, x64)
  • tsserverlibrary-startup - node (v22.8.0, x64)
  • typescript-startup - node (v22.8.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@jakebailey
Copy link
Member Author

As a note to self, if/when we switch to ESM when require(ESM) is stable, to ensure require("node_modules/typescript/lib/tsc.js") still works (is synchronous), we'd need to write this:

const { createRequire, enableCompileCache } = process.getBuiltinModule("node:module");
enableCompileCache();
createRequire(import.meta.url)("./_tsc.js");

let output = options.output;
if (options.enableCompileCache) {
const originalOutput = output;
output = path.join(path.dirname(output), "_" + path.basename(output));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to say that _tsc tab-completes better on the command-line, though, because it doesn't interfere with types<TAB> -- but there's so much stuff in built/local that it doesn't actually make a difference.

@jakebailey
Copy link
Member Author

@typescript-bot perf test this faster [email protected],[email protected]

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 26, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test this faster [email protected],[email protected] ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v20.17.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,340 62,340 ~ ~ ~ p=1.000 n=6
Types 50,378 50,378 ~ ~ ~ p=1.000 n=6
Memory used 190,848k (± 0.01%) 191,508k (± 0.78%) +660k (+ 0.35%) 190,876k 194,556k p=0.005 n=6
Parse Time 1.37s (± 0.55%) 1.36s (± 1.08%) ~ 1.33s 1.37s p=0.062 n=6
Bind Time 0.73s (± 1.14%) 0.73s (± 0.74%) ~ 0.73s 0.74s p=0.855 n=6
Check Time 9.24s (± 0.29%) 9.25s (± 0.24%) ~ 9.22s 9.28s p=0.570 n=6
Emit Time 2.80s (± 0.42%) 2.80s (± 0.42%) ~ 2.78s 2.81s p=0.804 n=6
Total Time 14.15s (± 0.19%) 14.14s (± 0.29%) ~ 14.07s 14.18s p=1.000 n=6
angular-1 - node (v20.17.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 947,102 947,102 ~ ~ ~ p=1.000 n=6
Types 410,738 410,738 ~ ~ ~ p=1.000 n=6
Memory used 1,221,929k (± 0.00%) 1,221,979k (± 0.00%) +50k (+ 0.00%) 1,221,913k 1,222,011k p=0.031 n=6
Parse Time 6.97s (± 1.04%) 6.94s (± 0.34%) ~ 6.91s 6.96s p=0.572 n=6
Bind Time 2.00s (± 0.45%) 2.00s (± 0.20%) ~ 2.00s 2.01s p=0.787 n=6
Check Time 30.67s (± 0.39%) 30.68s (± 0.38%) ~ 30.57s 30.86s p=1.000 n=6
Emit Time 14.61s (± 0.46%) 14.55s (± 0.47%) ~ 14.50s 14.68s p=0.170 n=6
Total Time 54.25s (± 0.29%) 54.17s (± 0.22%) ~ 54.02s 54.27s p=0.335 n=6
mui-docs - node (v20.17.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,521,651 2,521,651 ~ ~ ~ p=1.000 n=6
Types 936,037 936,037 ~ ~ ~ p=1.000 n=6
Memory used 2,348,925k (± 0.01%) 2,349,004k (± 0.00%) ~ 2,348,850k 2,349,070k p=0.298 n=6
Parse Time 9.49s (± 1.79%) 9.46s (± 0.35%) ~ 9.42s 9.50s p=0.686 n=6
Bind Time 2.19s (± 0.55%) 2.19s (± 0.45%) ~ 2.18s 2.20s p=0.720 n=6
Check Time 73.25s (± 1.57%) 72.94s (± 1.59%) ~ 71.89s 75.09s p=0.936 n=6
Emit Time 0.62s (±141.02%) 0.26s (± 1.56%) ~ 0.26s 0.27s p=0.527 n=6
Total Time 85.55s (± 1.49%) 84.86s (± 1.37%) ~ 83.78s 87.00s p=0.471 n=6
self-build-src - node (v20.17.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,474 1,250,474 ~ ~ ~ p=1.000 n=6
Types 265,039 265,039 ~ ~ ~ p=1.000 n=6
Memory used 2,404,144k (± 2.61%) 2,378,192k (± 0.03%) ~ 2,377,652k 2,379,449k p=0.378 n=6
Parse Time 5.42s (± 0.80%) 5.39s (± 0.68%) ~ 5.34s 5.44s p=0.199 n=6
Bind Time 2.04s (± 0.62%) 2.03s (± 0.25%) ~ 2.02s 2.03s p=0.055 n=6
Check Time 34.46s (± 0.28%) 34.41s (± 0.20%) ~ 34.31s 34.47s p=0.422 n=6
Emit Time 3.03s (± 2.70%) 3.07s (± 3.61%) ~ 2.93s 3.22s p=0.378 n=6
Total Time 44.98s (± 0.19%) 44.90s (± 0.29%) ~ 44.73s 45.08s p=0.378 n=6
self-build-src-public-api - node (v20.17.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,474 1,250,474 ~ ~ ~ p=1.000 n=6
Types 265,039 265,039 ~ ~ ~ p=1.000 n=6
Memory used 2,534,493k (± 5.77%) 2,511,825k (± 5.81%) ~ 2,448,791k 2,810,235k p=0.689 n=6
Parse Time 6.79s (± 1.58%) 6.80s (± 1.90%) ~ 6.64s 6.97s p=0.936 n=6
Bind Time 2.24s (± 1.67%) 2.26s (± 1.02%) ~ 2.23s 2.30s p=0.228 n=6
Check Time 41.61s (± 1.15%) 41.85s (± 0.84%) ~ 41.45s 42.37s p=0.298 n=6
Emit Time 3.77s (± 3.12%) 3.62s (± 1.13%) 🟩-0.15s (- 3.94%) 3.56s 3.65s p=0.005 n=6
Total Time 54.41s (± 0.81%) 54.53s (± 0.60%) ~ 54.19s 55.04s p=0.575 n=6
self-compiler - node (v20.17.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 260,972 260,972 ~ ~ ~ p=1.000 n=6
Types 106,405 106,405 ~ ~ ~ p=1.000 n=6
Memory used 436,323k (± 0.29%) 436,365k (± 0.28%) ~ 434,716k 437,310k p=0.810 n=6
Parse Time 3.68s (± 1.04%) 3.71s (± 1.69%) ~ 3.61s 3.79s p=0.375 n=6
Bind Time 1.34s (± 1.10%) 1.33s (± 1.11%) ~ 1.30s 1.34s p=0.195 n=6
Check Time 17.95s (± 0.32%) 17.94s (± 0.33%) ~ 17.87s 18.01s p=0.574 n=6
Emit Time 1.58s (± 1.35%) 1.57s (± 1.61%) ~ 1.53s 1.60s p=0.413 n=6
Total Time 24.55s (± 0.32%) 24.55s (± 0.41%) ~ 24.40s 24.65s p=0.936 n=6
ts-pre-modules - node (v20.17.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,916 225,916 ~ ~ ~ p=1.000 n=6
Types 94,414 94,414 ~ ~ ~ p=1.000 n=6
Memory used 368,965k (± 0.01%) 368,962k (± 0.01%) ~ 368,933k 369,013k p=0.689 n=6
Parse Time 2.97s (± 1.51%) 2.95s (± 1.79%) ~ 2.87s 3.01s p=0.419 n=6
Bind Time 1.62s (± 1.29%) 1.63s (± 0.63%) ~ 1.61s 1.64s p=0.516 n=6
Check Time 15.47s (± 0.26%) 15.48s (± 0.61%) ~ 15.39s 15.62s p=0.747 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.07s (± 0.39%) 20.05s (± 0.59%) ~ 19.94s 20.27s p=0.470 n=6
vscode - node (v20.17.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,104,518 3,104,518 ~ ~ ~ p=1.000 n=6
Types 1,070,045 1,070,045 ~ ~ ~ p=1.000 n=6
Memory used 3,196,270k (± 0.00%) 3,196,224k (± 0.00%) ~ 3,195,950k 3,196,392k p=0.936 n=6
Parse Time 13.95s (± 0.45%) 13.98s (± 0.86%) ~ 13.90s 14.22s p=0.687 n=6
Bind Time 4.48s (± 0.59%) 4.48s (± 0.33%) ~ 4.46s 4.50s p=0.745 n=6
Check Time 84.50s (± 4.17%) 83.61s (± 4.01%) ~ 80.82s 89.60s p=0.575 n=6
Emit Time 25.44s (± 9.72%) 25.41s (±10.07%) ~ 21.99s 27.26s p=1.000 n=6
Total Time 128.37s (± 3.41%) 127.47s (± 3.98%) ~ 122.05s 135.32s p=0.575 n=6
webpack - node (v20.17.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 279,071 279,071 ~ ~ ~ p=1.000 n=6
Types 113,893 113,893 ~ ~ ~ p=1.000 n=6
Memory used 426,553k (± 0.01%) 426,597k (± 0.01%) ~ 426,555k 426,661k p=0.093 n=6
Parse Time 4.19s (± 0.71%) 4.16s (± 0.74%) ~ 4.11s 4.19s p=0.120 n=6
Bind Time 1.85s (± 0.74%) 1.86s (± 2.13%) ~ 1.82s 1.92s p=0.870 n=6
Check Time 17.07s (± 1.85%) 16.93s (± 0.27%) ~ 16.88s 17.00s p=0.572 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 23.11s (± 1.34%) 22.96s (± 0.11%) ~ 22.91s 22.98s p=0.225 n=6
xstate-main - node (v20.17.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 540,027 540,027 ~ ~ ~ p=1.000 n=6
Types 181,292 181,292 ~ ~ ~ p=1.000 n=6
Memory used 481,653k (± 0.00%) 481,737k (± 0.01%) +83k (+ 0.02%) 481,703k 481,793k p=0.005 n=6
Parse Time 3.58s (± 1.14%) 3.58s (± 1.02%) ~ 3.53s 3.62s p=0.809 n=6
Bind Time 1.23s (± 0.80%) 1.23s (± 0.42%) ~ 1.23s 1.24s p=0.931 n=6
Check Time 17.81s (± 0.47%) 17.90s (± 1.22%) ~ 17.77s 18.34s p=0.688 n=6
Emit Time 0.00s (±244.70%) 0.00s ~ ~ ~ p=0.405 n=6
Total Time 22.61s (± 0.38%) 22.72s (± 0.96%) ~ 22.58s 23.16s p=0.575 n=6
Compiler-Unions - node (v22.8.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,340 62,340 ~ ~ ~ p=1.000 n=6
Types 50,378 50,378 ~ ~ ~ p=1.000 n=6
Memory used 194,047k (± 1.00%) 195,354k (± 0.99%) ~ 192,863k 196,651k p=0.066 n=6
Parse Time 1.33s (± 2.67%) 1.37s (± 2.21%) ~ 1.33s 1.41s p=0.106 n=6
Bind Time 0.69s (± 1.18%) 0.69s (± 1.42%) ~ 0.68s 0.70s p=1.000 n=6
Check Time 8.83s (± 0.45%) 8.83s (± 0.50%) ~ 8.76s 8.89s p=0.810 n=6
Emit Time 2.68s (± 4.85%) 2.66s (± 4.32%) ~ 2.59s 2.89s p=0.936 n=6
Total Time 13.55s (± 1.22%) 13.55s (± 0.61%) ~ 13.42s 13.67s p=1.000 n=6
angular-1 - node (v22.8.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 947,102 947,102 ~ ~ ~ p=1.000 n=6
Types 410,738 410,738 ~ ~ ~ p=1.000 n=6
Memory used 1,223,721k (± 0.00%) 1,223,795k (± 0.00%) +74k (+ 0.01%) 1,223,745k 1,223,861k p=0.013 n=6
Parse Time 6.86s (± 0.58%) 6.90s (± 0.46%) ~ 6.85s 6.94s p=0.170 n=6
Bind Time 2.01s (± 2.20%) 1.99s (± 0.26%) ~ 1.99s 2.00s p=0.923 n=6
Check Time 30.47s (± 0.32%) 30.49s (± 0.56%) ~ 30.25s 30.78s p=0.809 n=6
Emit Time 14.92s (± 0.38%) 14.92s (± 0.69%) ~ 14.78s 15.01s p=1.000 n=6
Total Time 54.26s (± 0.26%) 54.30s (± 0.32%) ~ 54.19s 54.63s p=0.872 n=6
mui-docs - node (v22.8.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,521,651 2,521,651 ~ ~ ~ p=1.000 n=6
Types 936,037 936,037 ~ ~ ~ p=1.000 n=6
Memory used 2,348,889k (± 0.00%) 2,348,971k (± 0.00%) +82k (+ 0.00%) 2,348,938k 2,349,030k p=0.020 n=6
Parse Time 7.83s (± 0.33%) 7.82s (± 0.25%) ~ 7.78s 7.83s p=0.454 n=6
Bind Time 1.88s (± 0.56%) 1.87s (± 1.04%) ~ 1.84s 1.89s p=1.000 n=6
Check Time 65.66s (± 1.40%) 66.04s (± 2.54%) ~ 64.42s 69.04s p=1.000 n=6
Emit Time 0.25s (± 1.62%) 0.26s (± 2.01%) ~ 0.25s 0.26s p=0.112 n=6
Total Time 75.62s (± 1.19%) 75.98s (± 2.19%) ~ 74.39s 78.97s p=1.000 n=6
self-build-src - node (v22.8.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,474 1,250,474 ~ ~ ~ p=1.000 n=6
Types 265,039 265,039 ~ ~ ~ p=1.000 n=6
Memory used 2,393,834k (± 0.01%) 2,394,856k (± 0.01%) +1,021k (+ 0.04%) 2,394,472k 2,395,212k p=0.005 n=6
Parse Time 5.01s (± 0.80%) 4.96s (± 0.99%) ~ 4.92s 5.04s p=0.092 n=6
Bind Time 2.03s (± 1.26%) 2.00s (± 0.76%) ~ 1.99s 2.03s p=0.081 n=6
Check Time 31.64s (± 0.11%) 31.65s (± 0.21%) ~ 31.55s 31.76s p=1.000 n=6
Emit Time 2.27s (± 1.82%) 2.26s (± 0.18%) ~ 2.26s 2.27s p=0.059 n=6
Total Time 40.95s (± 0.19%) 40.87s (± 0.23%) ~ 40.75s 41.03s p=0.230 n=6
self-build-src-public-api - node (v22.8.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,474 1,250,474 ~ ~ ~ p=1.000 n=6
Types 265,039 265,039 ~ ~ ~ p=1.000 n=6
Memory used 2,474,236k (± 0.02%) 2,474,664k (± 0.01%) ~ 2,474,155k 2,475,005k p=0.093 n=6
Parse Time 5.23s (± 2.23%) 5.23s (± 0.78%) ~ 5.20s 5.31s p=0.336 n=6
Bind Time 1.79s (± 1.83%) 1.80s (± 0.91%) ~ 1.77s 1.82s p=0.378 n=6
Check Time 32.37s (± 1.37%) 32.53s (± 0.49%) ~ 32.37s 32.82s p=0.810 n=6
Emit Time 2.29s (± 1.12%) 2.27s (± 1.09%) ~ 2.23s 2.30s p=0.375 n=6
Total Time 41.69s (± 0.80%) 41.81s (± 0.40%) ~ 41.64s 42.11s p=0.936 n=6
self-compiler - node (v22.8.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 260,972 260,972 ~ ~ ~ p=1.000 n=6
Types 106,405 106,405 ~ ~ ~ p=1.000 n=6
Memory used 436,619k (± 0.02%) 436,609k (± 0.01%) ~ 436,583k 436,642k p=0.470 n=6
Parse Time 2.89s (± 3.00%) 2.85s (± 0.91%) ~ 2.81s 2.88s p=0.747 n=6
Bind Time 1.22s (± 8.22%) 1.29s (± 1.79%) ~ 1.25s 1.32s p=0.333 n=6
Check Time 14.86s (± 0.22%) 14.86s (± 0.45%) ~ 14.75s 14.92s p=0.809 n=6
Emit Time 1.15s (± 0.86%) 1.16s (± 0.45%) ~ 1.15s 1.16s p=0.140 n=6
Total Time 20.12s (± 0.13%) 20.15s (± 0.49%) ~ 20.02s 20.26s p=0.872 n=6
ts-pre-modules - node (v22.8.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,916 225,916 ~ ~ ~ p=1.000 n=6
Types 94,414 94,414 ~ ~ ~ p=1.000 n=6
Memory used 371,279k (± 0.01%) 371,320k (± 0.01%) ~ 371,288k 371,349k p=0.093 n=6
Parse Time 2.44s (± 0.87%) 2.45s (± 1.40%) ~ 2.42s 2.51s p=0.685 n=6
Bind Time 1.36s (± 0.30%) 1.36s (± 1.57%) ~ 1.34s 1.40s p=0.257 n=6
Check Time 12.72s (± 0.32%) 12.65s (± 0.36%) ~ 12.60s 12.71s p=0.065 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 16.51s (± 0.17%) 16.46s (± 0.13%) -0.05s (- 0.30%) 16.44s 16.50s p=0.010 n=6
vscode - node (v22.8.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,104,518 3,104,518 ~ ~ ~ p=1.000 n=6
Types 1,070,045 1,070,045 ~ ~ ~ p=1.000 n=6
Memory used 3,197,361k (± 0.00%) 3,197,439k (± 0.00%) ~ 3,197,250k 3,197,573k p=0.173 n=6
Parse Time 12.11s (± 0.25%) 12.16s (± 1.11%) ~ 11.99s 12.36s p=0.809 n=6
Bind Time 4.25s (±17.23%) 4.30s (±17.51%) ~ 3.93s 5.82s p=0.935 n=6
Check Time 74.06s (± 4.46%) 74.61s (± 3.33%) ~ 72.28s 78.75s p=0.471 n=6
Emit Time 24.81s (± 7.10%) 24.16s (± 9.35%) ~ 21.19s 25.84s p=1.000 n=6
Total Time 115.23s (± 1.42%) 115.22s (± 3.11%) ~ 110.41s 120.51s p=0.810 n=6
webpack - node (v22.8.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 279,071 279,071 ~ ~ ~ p=1.000 n=6
Types 113,893 113,893 ~ ~ ~ p=1.000 n=6
Memory used 428,761k (± 0.03%) 428,768k (± 0.03%) ~ 428,578k 428,908k p=0.810 n=6
Parse Time 3.30s (± 0.97%) 3.32s (± 1.42%) ~ 3.25s 3.37s p=0.629 n=6
Bind Time 1.36s (± 0.62%) 1.36s (± 1.36%) ~ 1.34s 1.39s p=0.548 n=6
Check Time 12.94s (± 0.29%) 12.91s (± 0.31%) ~ 12.86s 12.98s p=0.226 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 17.60s (± 0.28%) 17.59s (± 0.26%) ~ 17.53s 17.66s p=0.809 n=6
xstate-main - node (v22.8.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 540,027 540,027 ~ ~ ~ p=1.000 n=6
Types 181,292 181,292 ~ ~ ~ p=1.000 n=6
Memory used 484,128k (± 0.01%) 484,201k (± 0.01%) +73k (+ 0.02%) 484,172k 484,245k p=0.005 n=6
Parse Time 2.77s (± 1.04%) 2.78s (± 1.34%) ~ 2.72s 2.83s p=0.629 n=6
Bind Time 0.92s (± 1.49%) 0.92s (± 2.02%) ~ 0.90s 0.95s p=1.000 n=6
Check Time 14.63s (± 0.49%) 14.61s (± 0.28%) ~ 14.54s 14.64s p=0.808 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 18.32s (± 0.45%) 18.31s (± 0.19%) ~ 18.26s 18.36s p=0.574 n=6
System info unknown
Hosts
  • node (v20.17.0, x64)
  • node (v22.8.0, x64)
Scenarios
  • Compiler-Unions - node (v20.17.0, x64)
  • angular-1 - node (v20.17.0, x64)
  • mui-docs - node (v20.17.0, x64)
  • self-build-src - node (v20.17.0, x64)
  • self-build-src-public-api - node (v20.17.0, x64)
  • self-compiler - node (v20.17.0, x64)
  • ts-pre-modules - node (v20.17.0, x64)
  • vscode - node (v20.17.0, x64)
  • webpack - node (v20.17.0, x64)
  • xstate-main - node (v20.17.0, x64)
  • Compiler-Unions - node (v22.8.0, x64)
  • angular-1 - node (v22.8.0, x64)
  • mui-docs - node (v22.8.0, x64)
  • self-build-src - node (v22.8.0, x64)
  • self-build-src-public-api - node (v22.8.0, x64)
  • self-compiler - node (v22.8.0, x64)
  • ts-pre-modules - node (v22.8.0, x64)
  • vscode - node (v22.8.0, x64)
  • webpack - node (v22.8.0, x64)
  • xstate-main - node (v22.8.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@jakebailey jakebailey merged commit 5119230 into microsoft:main Sep 26, 2024
32 checks passed
@jakebailey jakebailey deleted the v8-compile-cache branch September 26, 2024 21:53
Copy link

@anishkumar127 anishkumar127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants