Skip to content

Divide-and-conquer strategy for intersections of unions - #57871

Merged
Anders Hejlsberg (ahejlsberg) merged 7 commits into
mainfrom
fix57863
Mar 21, 2024
Merged

Divide-and-conquer strategy for intersections of unions#57871
Anders Hejlsberg (ahejlsberg) merged 7 commits into
mainfrom
fix57863

Conversation

@ahejlsberg

@ahejlsberg Anders Hejlsberg (ahejlsberg) commented Mar 21, 2024

Copy link
Copy Markdown
Member

With this PR we implement a "divide and conquer" strategy for handling large intersections of union types. Specifically, when creating an intersection with four or more constituents, some of which are unions, we divide the constituents into two groups such that A & B & C & D is processed as (A & B) & (C & D). Since intersections of unions often produce far smaller unions of intersections than the full cartesian product (due to some intersections becoming never), this can dramatically reduce the overall work at the cost of generating slightly more types (because of the temporary intersections). For example, the reduced repro from #57863 that barely passes before this PR takes 0.28s to type check. That drops to 0.08s with this PR.

Fixes #57863.

@ahejlsberg

Copy link
Copy Markdown
Member Author

@typescript-bot

TypeScript Bot (typescript-bot) commented Mar 21, 2024

Copy link
Copy Markdown
Contributor

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

Command Status Results
test top200 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started
perf test this faster ✅ Started 👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg) Here are the results of running the user test suite comparing main and refs/pull/57871/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg)
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
Angular - node (v18.15.0, x64)
Memory used 295,627k (± 0.01%) 295,592k (± 0.01%) -35k (- 0.01%) 295,561k 295,611k p=0.031 n=6
Parse Time 2.66s (± 0.15%) 2.66s (± 0.28%) ~ 2.65s 2.67s p=1.000 n=6
Bind Time 0.83s (± 0.00%) 0.83s (± 0.66%) ~ 0.82s 0.83s p=0.071 n=6
Check Time 8.22s (± 0.32%) 8.21s (± 0.31%) ~ 8.18s 8.24s p=1.000 n=6
Emit Time 7.04s (± 0.39%) 7.03s (± 0.32%) ~ 7.01s 7.07s p=0.570 n=6
Total Time 18.75s (± 0.19%) 18.74s (± 0.14%) ~ 18.70s 18.77s p=0.418 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,618k (± 0.76%) 192,528k (± 0.73%) ~ 191,872k 195,396k p=0.575 n=6
Parse Time 1.36s (± 0.80%) 1.36s (± 1.23%) ~ 1.34s 1.38s p=0.867 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.49s (± 1.04%) 9.50s (± 0.73%) ~ 9.43s 9.60s p=0.810 n=6
Emit Time 2.63s (± 0.70%) 2.63s (± 0.37%) ~ 2.62s 2.64s p=0.730 n=6
Total Time 14.21s (± 0.76%) 14.21s (± 0.43%) ~ 14.14s 14.30s p=0.688 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,361k (± 0.00%) 347,378k (± 0.00%) ~ 347,367k 347,389k p=0.054 n=6
Parse Time 2.49s (± 0.16%) 2.49s (± 0.33%) ~ 2.48s 2.50s p=0.584 n=6
Bind Time 0.93s (± 0.44%) 0.93s (± 0.44%) ~ 0.92s 0.93s p=1.000 n=6
Check Time 7.00s (± 0.37%) 7.03s (± 0.43%) ~ 6.99s 7.06s p=0.107 n=6
Emit Time 4.08s (± 0.57%) 4.06s (± 0.22%) -0.03s (- 0.61%) 4.05s 4.07s p=0.021 n=6
Total Time 14.50s (± 0.25%) 14.50s (± 0.14%) ~ 14.47s 14.53s p=0.872 n=6
TFS - node (v18.15.0, x64)
Memory used 302,726k (± 0.01%) 302,721k (± 0.01%) ~ 302,675k 302,761k p=0.936 n=6
Parse Time 2.01s (± 1.18%) 2.02s (± 0.58%) ~ 2.00s 2.03s p=0.625 n=6
Bind Time 1.01s (± 1.02%) 1.00s (± 0.52%) ~ 0.99s 1.00s p=0.069 n=6
Check Time 6.32s (± 0.23%) 6.33s (± 0.62%) ~ 6.29s 6.39s p=0.935 n=6
Emit Time 3.60s (± 0.42%) 3.60s (± 0.29%) ~ 3.59s 3.62s p=0.406 n=6
Total Time 12.93s (± 0.19%) 12.95s (± 0.35%) ~ 12.89s 13.02s p=0.469 n=6
material-ui - node (v18.15.0, x64)
Memory used 509,875k (± 0.00%) 509,899k (± 0.01%) ~ 509,841k 510,018k p=0.810 n=6
Parse Time 2.65s (± 0.70%) 2.66s (± 0.61%) ~ 2.63s 2.68s p=0.498 n=6
Bind Time 0.99s (± 1.38%) 0.99s (± 0.52%) ~ 0.98s 0.99s p=0.504 n=6
Check Time 17.25s (± 0.36%) 17.26s (± 0.51%) ~ 17.12s 17.35s p=1.000 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.88s (± 0.31%) 20.90s (± 0.45%) ~ 20.77s 21.02s p=0.936 n=6
mui-docs - node (v18.15.0, x64)
Memory used 1,719,659k (± 0.00%) 1,737,371k (± 0.00%) +17,712k (+ 1.03%) 1,737,338k 1,737,411k p=0.005 n=6
Parse Time 6.57s (± 0.40%) 6.59s (± 0.72%) ~ 6.55s 6.68s p=0.935 n=6
Bind Time 2.35s (± 0.32%) 2.36s (± 0.58%) ~ 2.35s 2.38s p=0.149 n=6
Check Time 56.22s (± 0.24%) 56.32s (± 0.25%) ~ 56.14s 56.48s p=0.575 n=6
Emit Time 0.13s (± 3.10%) 0.14s (± 4.05%) ~ 0.13s 0.14s p=0.282 n=6
Total Time 65.28s (± 0.19%) 65.40s (± 0.26%) ~ 65.18s 65.59s p=0.520 n=6
self-build-src - node (v18.15.0, x64)
Memory used 2,392,230k (± 0.03%) 2,391,836k (± 0.03%) ~ 2,390,583k 2,392,691k p=0.378 n=6
Parse Time 5.00s (± 1.42%) 5.01s (± 1.57%) ~ 4.88s 5.09s p=0.689 n=6
Bind Time 1.90s (± 0.99%) 1.89s (± 1.02%) ~ 1.87s 1.92s p=0.808 n=6
Check Time 33.58s (± 0.34%) 33.69s (± 0.30%) ~ 33.57s 33.87s p=0.173 n=6
Emit Time 2.62s (± 1.76%) 2.63s (± 1.47%) ~ 2.56s 2.67s p=0.573 n=6
Total Time 43.12s (± 0.45%) 43.25s (± 0.17%) ~ 43.18s 43.34s p=0.128 n=6
self-compiler - node (v18.15.0, x64)
Memory used 415,116k (± 0.01%) 415,119k (± 0.01%) ~ 415,083k 415,160k p=0.630 n=6
Parse Time 2.83s (± 0.58%) 2.84s (± 0.65%) ~ 2.82s 2.87s p=0.560 n=6
Bind Time 1.07s (± 0.38%) 1.08s (± 0.51%) ~ 1.07s 1.08s p=0.282 n=6
Check Time 15.32s (± 0.26%) 15.30s (± 0.32%) ~ 15.24s 15.36s p=0.686 n=6
Emit Time 1.11s (± 0.47%) 1.11s (± 0.68%) ~ 1.10s 1.12s p=0.241 n=6
Total Time 20.33s (± 0.29%) 20.33s (± 0.31%) ~ 20.24s 20.38s p=0.872 n=6
vscode - node (v18.15.0, x64)
Memory used 2,887,899k (± 0.00%) 2,887,877k (± 0.00%) ~ 2,887,763k 2,887,996k p=0.748 n=6
Parse Time 10.84s (± 0.32%) 10.84s (± 0.17%) ~ 10.81s 10.86s p=0.511 n=6
Bind Time 3.47s (± 0.68%) 3.46s (± 0.38%) ~ 3.44s 3.48s p=0.869 n=6
Check Time 61.41s (± 0.48%) 61.81s (± 0.33%) +0.41s (+ 0.66%) 61.55s 62.04s p=0.030 n=6
Emit Time 16.38s (± 0.44%) 17.02s (± 8.11%) ~ 16.35s 19.84s p=0.065 n=6
Total Time 92.10s (± 0.38%) 93.15s (± 1.57%) +1.05s (+ 1.14%) 92.39s 96.11s p=0.013 n=6
webpack - node (v18.15.0, x64)
Memory used 408,023k (± 0.01%) 408,046k (± 0.01%) ~ 407,998k 408,158k p=0.575 n=6
Parse Time 3.21s (± 0.51%) 3.22s (± 0.60%) ~ 3.20s 3.25s p=0.807 n=6
Bind Time 1.38s (± 0.71%) 1.38s (± 0.85%) ~ 1.36s 1.39s p=1.000 n=6
Check Time 14.26s (± 0.26%) 14.28s (± 0.26%) ~ 14.24s 14.34s p=0.413 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 18.86s (± 0.16%) 18.89s (± 0.15%) ~ 18.85s 18.92s p=0.124 n=6
xstate - node (v18.15.0, x64)
Memory used 512,961k (± 0.01%) 513,044k (± 0.01%) ~ 512,964k 513,118k p=0.093 n=6
Parse Time 3.28s (± 0.23%) 3.28s (± 0.19%) ~ 3.27s 3.29s p=0.718 n=6
Bind Time 1.54s (± 0.64%) 1.54s (± 0.34%) ~ 1.53s 1.54s p=0.504 n=6
Check Time 2.85s (± 0.53%) 2.85s (± 0.22%) ~ 2.84s 2.86s p=0.739 n=6
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) ~ 0.07s 0.07s p=1.000 n=6
Total Time 7.74s (± 0.24%) 7.75s (± 0.16%) ~ 7.73s 7.76s p=0.519 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg) Here are the results of running the top-repos suite comparing main and refs/pull/57871/merge:

Everything looks good!

@ahejlsberg

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) run dt
TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Mar 21, 2024

Copy link
Copy Markdown
Contributor

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

Command Status Results
run dt ✅ Started 👀 Results
perf test this faster ✅ Started 👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Anders Hejlsberg (@ahejlsberg), the results of running the DT tests are ready.
There were interesting changes:

Branch only errors:

Package: amap-js-api-driving
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/amap-js-api-driving/amap-js-api-driving-tests.ts
  162:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect
  166:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: amap-js-api-riding
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/amap-js-api-riding/amap-js-api-riding-tests.ts
  100:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect
  110:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect
  145:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect
  149:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect

✖ 4 problems (4 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: amap-js-api-transfer
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/amap-js-api-transfer/amap-js-api-transfer-tests.ts
  321:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect
  325:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect
  351:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect
  353:9  error  TypeScript@local expected type to be:
  PoiExt
got:
  PoiBase & { website: string; pcode: string; citycode: string; adcode: string; postcode: string; pname: string; cityname: string; adname: string; email: string; photos: PoiPhoto[]; entr_location: LngLat | null; exit_location: LngLat | null; groupbuy: boolean; discount: boolean; } & (({ indoor_map: true; indoor_data: { cpid: string; floor: string; truefloor: string; }; } | { indoor_map: false; }) & { groupbuys?: Groupbuy[] | undefined; discounts?: Discount[] | undefined; } & ({ deep_type: "CINEMA"; cinema: Cinema; } | { deep_type: "DINING"; dining: Dining; } | { deep_type: "SCENIC"; scenic: Scenic; } | { deep_type: "HOTEL"; hotel: Hotel; }))  @definitelytyped/expect

✖ 4 problems (4 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg)
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
Angular - node (v18.15.0, x64)
Memory used 295,609k (± 0.00%) 295,633k (± 0.00%) +24k (+ 0.01%) 295,622k 295,654k p=0.013 n=6
Parse Time 2.67s (± 0.44%) 2.67s (± 0.31%) ~ 2.66s 2.68s p=0.555 n=6
Bind Time 0.83s (± 0.62%) 0.83s (± 0.49%) ~ 0.82s 0.83s p=0.595 n=6
Check Time 8.22s (± 0.22%) 8.20s (± 0.39%) ~ 8.17s 8.26s p=0.077 n=6
Emit Time 7.03s (± 0.30%) 7.06s (± 0.77%) ~ 7.01s 7.14s p=0.517 n=6
Total Time 18.75s (± 0.16%) 18.75s (± 0.35%) ~ 18.67s 18.82s p=0.872 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 193,097k (± 0.97%) 192,460k (± 0.74%) ~ 191,814k 195,381k p=0.298 n=6
Parse Time 1.35s (± 1.58%) 1.36s (± 1.42%) ~ 1.34s 1.39s p=0.370 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.49s (± 0.71%) 9.49s (± 0.76%) ~ 9.43s 9.61s p=1.000 n=6
Emit Time 2.65s (± 0.50%) 2.64s (± 0.75%) ~ 2.61s 2.66s p=0.287 n=6
Total Time 14.21s (± 0.33%) 14.21s (± 0.56%) ~ 14.13s 14.34s p=0.688 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,371k (± 0.00%) 347,385k (± 0.01%) ~ 347,364k 347,417k p=0.261 n=6
Parse Time 2.49s (± 0.30%) 2.49s (± 0.70%) ~ 2.47s 2.52s p=0.397 n=6
Bind Time 0.92s (± 0.56%) 0.93s (± 0.56%) ~ 0.92s 0.93s p=0.311 n=6
Check Time 7.02s (± 0.70%) 7.03s (± 0.29%) ~ 6.99s 7.05s p=1.000 n=6
Emit Time 4.06s (± 0.27%) 4.07s (± 0.39%) ~ 4.05s 4.09s p=0.410 n=6
Total Time 14.49s (± 0.38%) 14.51s (± 0.27%) ~ 14.44s 14.56s p=0.744 n=6
TFS - node (v18.15.0, x64)
Memory used 302,716k (± 0.01%) 302,732k (± 0.00%) ~ 302,718k 302,740k p=0.108 n=6
Parse Time 2.02s (± 0.51%) 2.01s (± 0.80%) ~ 1.99s 2.03s p=0.623 n=6
Bind Time 1.00s (± 0.82%) 1.00s (± 0.63%) ~ 0.99s 1.01s p=0.432 n=6
Check Time 6.31s (± 0.43%) 6.30s (± 0.16%) ~ 6.29s 6.32s p=0.618 n=6
Emit Time 3.60s (± 0.15%) 3.61s (± 0.39%) ~ 3.59s 3.63s p=0.498 n=6
Total Time 12.93s (± 0.20%) 12.93s (± 0.14%) ~ 12.91s 12.95s p=0.935 n=6
material-ui - node (v18.15.0, x64)
Memory used 509,886k (± 0.00%) 509,866k (± 0.00%) ~ 509,837k 509,900k p=0.230 n=6
Parse Time 2.66s (± 0.37%) 2.66s (± 0.66%) ~ 2.63s 2.68s p=0.869 n=6
Bind Time 0.98s (± 0.85%) 0.98s (± 0.85%) ~ 0.98s 1.00s p=1.000 n=6
Check Time 17.24s (± 0.21%) 17.26s (± 0.38%) ~ 17.17s 17.33s p=0.519 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.88s (± 0.19%) 20.90s (± 0.28%) ~ 20.81s 20.97s p=0.686 n=6
mui-docs - node (v18.15.0, x64)
Memory used 1,719,639k (± 0.00%) 1,737,399k (± 0.00%) +17,761k (+ 1.03%) 1,737,366k 1,737,442k p=0.005 n=6
Parse Time 6.59s (± 0.21%) 6.58s (± 0.56%) ~ 6.54s 6.62s p=0.806 n=6
Bind Time 2.35s (± 0.42%) 2.36s (± 0.35%) ~ 2.35s 2.37s p=0.282 n=6
Check Time 56.26s (± 0.33%) 56.50s (± 0.46%) ~ 56.25s 56.96s p=0.149 n=6
Emit Time 0.13s (± 3.10%) 0.13s (± 3.87%) ~ 0.13s 0.14s p=0.595 n=6
Total Time 65.33s (± 0.27%) 65.57s (± 0.43%) ~ 65.28s 66.07s p=0.173 n=6
self-build-src - node (v18.15.0, x64)
Memory used 2,392,082k (± 0.03%) 2,392,015k (± 0.04%) ~ 2,391,224k 2,393,568k p=0.936 n=6
Parse Time 5.05s (± 1.22%) 5.01s (± 0.99%) ~ 4.92s 5.06s p=0.521 n=6
Bind Time 1.90s (± 0.72%) 1.91s (± 0.80%) ~ 1.88s 1.92s p=0.868 n=6
Check Time 33.60s (± 0.33%) 33.55s (± 0.21%) ~ 33.48s 33.66s p=0.575 n=6
Emit Time 2.62s (± 1.65%) 2.63s (± 2.09%) ~ 2.55s 2.70s p=0.687 n=6
Total Time 43.20s (± 0.41%) 43.11s (± 0.30%) ~ 42.95s 43.31s p=0.471 n=6
self-compiler - node (v18.15.0, x64)
Memory used 415,083k (± 0.01%) 415,101k (± 0.01%) ~ 415,045k 415,174k p=0.575 n=6
Parse Time 2.82s (± 1.23%) 2.84s (± 0.85%) ~ 2.80s 2.86s p=0.466 n=6
Bind Time 1.08s (± 0.78%) 1.07s (± 0.70%) ~ 1.06s 1.08s p=0.432 n=6
Check Time 15.28s (± 0.38%) 15.28s (± 0.20%) ~ 15.23s 15.31s p=0.936 n=6
Emit Time 1.11s (± 1.23%) 1.11s (± 0.74%) ~ 1.10s 1.12s p=0.445 n=6
Total Time 20.29s (± 0.41%) 20.29s (± 0.15%) ~ 20.25s 20.34s p=0.936 n=6
vscode - node (v18.15.0, x64)
Memory used 2,888,153k (± 0.00%) 2,888,152k (± 0.00%) ~ 2,888,095k 2,888,237k p=0.810 n=6
Parse Time 10.82s (± 0.27%) 10.85s (± 0.43%) ~ 10.81s 10.94s p=0.257 n=6
Bind Time 3.47s (± 0.65%) 3.46s (± 0.30%) ~ 3.44s 3.47s p=0.139 n=6
Check Time 61.63s (± 0.24%) 61.66s (± 0.44%) ~ 61.43s 62.16s p=0.810 n=6
Emit Time 16.51s (± 0.66%) 16.46s (± 1.00%) ~ 16.32s 16.75s p=0.261 n=6
Total Time 92.44s (± 0.29%) 92.43s (± 0.28%) ~ 92.18s 92.81s p=0.936 n=6
webpack - node (v18.15.0, x64)
Memory used 408,137k (± 0.02%) 408,140k (± 0.02%) ~ 408,064k 408,245k p=0.936 n=6
Parse Time 3.25s (± 0.30%) 3.25s (± 0.23%) ~ 3.24s 3.26s p=0.858 n=6
Bind Time 1.38s (± 0.60%) 1.38s (± 0.30%) ~ 1.38s 1.39s p=0.527 n=6
Check Time 14.27s (± 0.18%) 14.25s (± 0.28%) ~ 14.20s 14.29s p=0.627 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 18.90s (± 0.17%) 18.88s (± 0.23%) ~ 18.83s 18.93s p=0.517 n=6
xstate - node (v18.15.0, x64)
Memory used 513,026k (± 0.01%) 513,021k (± 0.01%) ~ 512,915k 513,107k p=0.688 n=6
Parse Time 3.28s (± 0.30%) 3.29s (± 0.42%) ~ 3.26s 3.30s p=0.315 n=6
Bind Time 1.54s (± 0.00%) 1.54s (± 0.35%) ~ 1.54s 1.55s p=0.071 n=6
Check Time 2.85s (± 0.48%) 2.85s (± 0.42%) ~ 2.83s 2.86s p=1.000 n=6
Emit Time 0.07s (± 0.00%) 0.07s (± 5.69%) ~ 0.07s 0.08s p=0.405 n=6
Total Time 7.74s (± 0.27%) 7.74s (± 0.25%) ~ 7.71s 7.76s p=0.936 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@ahejlsberg

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) run dt

@typescript-bot

TypeScript Bot (typescript-bot) commented Mar 21, 2024

Copy link
Copy Markdown
Contributor

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

Command Status Results
run dt ✅ Started ✅ Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Anders Hejlsberg (@ahejlsberg), the results of running the DT tests are ready.
Everything looks the same!
You can check the log here.

@ahejlsberg

Copy link
Copy Markdown
Member Author

Tests and performance are unaffected. This is ready for a review.

Comment thread src/compiler/checker.ts Outdated
@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) cherry-pick this to release-5.4

@typescript-bot

TypeScript Bot (typescript-bot) commented Mar 21, 2024

Copy link
Copy Markdown
Contributor

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

Command Status Results
cherry-pick this to release-5.4 ✅ Started ❌ Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey, Jake Bailey (@jakebailey)! I was unable to cherry-pick this PR.

Check the logs at: https://github.com/microsoft/TypeScript/actions/runs/8380435679

@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) cherry-pick this to release-5.4

@typescript-bot

TypeScript Bot (typescript-bot) commented Mar 21, 2024

Copy link
Copy Markdown
Contributor

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

Command Status Results
cherry-pick this to release-5.4 ✅ Started ✅ Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey, Jake Bailey (@jakebailey)! I've created #57893 for you. This involved updating baselines; please check the diff.

@KnorpelSenf

Copy link
Copy Markdown

This is huge, thank you so much! I've been working around this limitation in my library for almost a year now. These changes allow me to do so much more now! 🎉❤️

@KnorpelSenf

Copy link
Copy Markdown

Anders Hejlsberg (@ahejlsberg) I would like to see a patch release on top of 5.4 with these changes. Is there anything I can do to help get this out there?

@jakebailey

Copy link
Copy Markdown
Member

This is backported (see above), and will be in the next patch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

5 participants