Skip to content

Fixed narrowing of optional chains using type predicates#60120

Open
Andarist wants to merge 2 commits intomicrosoft:mainfrom
Andarist:fix/predicate-narrowing-vs-opional-chains
Open

Fixed narrowing of optional chains using type predicates#60120
Andarist wants to merge 2 commits intomicrosoft:mainfrom
Andarist:fix/predicate-narrowing-vs-opional-chains

Conversation

@Andarist
Copy link
Contributor

@Andarist Andarist commented Oct 2, 2024

fixes #60106

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Oct 2, 2024
Comment on lines +29179 to +29188
if (!assumeTrue && type.flags & TypeFlags.Union && optionalChainContainsReference(expr, reference)) {
const types = [narrowedType];
if (containsUndefinedType(type)) {
types.push(undefinedType);
}
if (containsType((type as UnionType).types, nullType)) {
types.push(nullType);
}
return getUnionType(types);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm still thinking if this is the right place to "add back" those nullable types but in the meantime an extended test suite run could be insightful (however, this likely is not a popular pattern so maybe chances of it catching any potential issues is pretty low).

It feels like narrowTypeByCallExpression could be a better place for this... but it's much easier to do it here. narrowTypeByCallExpression receives a "flipped" assumeTrue so it isn't aware that it should not filter out null/undefined in what is the "true" !assumeTrue branch because it sees assumeTrue === true.

Copy link
Contributor Author

@Andarist Andarist Oct 3, 2024

Choose a reason for hiding this comment

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

note for myself: optionalChainContainsReference is too broad of a check, I should add tests with optional chains and identifier predicates

@jakebailey
Copy link
Member

I'll run the tests, but the self test is failing which implies something wrong (in one way or another)

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 2, 2024

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

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

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests with tsc comparing main and refs/pull/60120/merge:

Everything looks good!

@Andarist
Copy link
Contributor Author

Andarist commented Oct 2, 2024

Repro of the self-check failure: TS playground. I'll investigate this soon.

@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 (v18.15.0, x64)
Errors 31 31 ~ ~ ~ p=1.000 n=6
Symbols 62,340 62,340 ~ ~ ~ p=1.000 n=6
Types 50,379 50,379 ~ ~ ~ p=1.000 n=6
Memory used 195,890k (± 0.74%) 196,374k (± 0.08%) ~ 196,118k 196,566k p=0.575 n=6
Parse Time 1.60s (± 1.27%) 1.61s (± 0.52%) ~ 1.60s 1.62s p=0.244 n=6
Bind Time 0.87s (± 1.13%) 0.86s (± 0.94%) ~ 0.85s 0.87s p=0.282 n=6
Check Time 11.73s (± 0.35%) 11.72s (± 0.56%) ~ 11.65s 11.80s p=0.290 n=6
Emit Time 3.31s (± 0.99%) 3.41s (± 4.98%) ~ 3.26s 3.64s p=0.872 n=6
Total Time 17.51s (± 0.27%) 17.59s (± 0.69%) ~ 17.47s 17.76s p=0.260 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 33 ~ ~ ~ p=1.000 n=6
Symbols 947,886 947,886 ~ ~ ~ p=1.000 n=6
Types 410,840 410,840 ~ ~ ~ p=1.000 n=6
Memory used 1,224,584k (± 0.00%) 1,224,609k (± 0.00%) ~ 1,224,579k 1,224,633k p=0.128 n=6
Parse Time 6.65s (± 0.46%) 6.63s (± 0.84%) ~ 6.57s 6.73s p=0.294 n=6
Bind Time 1.88s (± 0.27%) 1.88s (± 0.40%) ~ 1.87s 1.89s p=0.241 n=6
Check Time 31.75s (± 0.29%) 31.81s (± 0.36%) ~ 31.65s 31.99s p=0.470 n=6
Emit Time 15.12s (± 0.31%) 15.15s (± 0.28%) ~ 15.11s 15.22s p=0.468 n=6
Total Time 55.39s (± 0.21%) 55.46s (± 0.21%) ~ 55.32s 55.63s p=0.298 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,536,010 2,536,010 ~ ~ ~ p=1.000 n=6
Types 935,586 935,586 ~ ~ ~ p=1.000 n=6
Memory used 2,368,987k (± 0.00%) 2,368,964k (± 0.00%) ~ 2,368,873k 2,369,029k p=0.689 n=6
Parse Time 9.47s (± 0.17%) 9.47s (± 0.34%) ~ 9.43s 9.52s p=0.677 n=6
Bind Time 2.19s (± 0.19%) 2.20s (± 0.83%) ~ 2.18s 2.23s p=0.849 n=6
Check Time 76.36s (± 0.60%) 75.93s (± 0.31%) ~ 75.59s 76.21s p=0.128 n=6
Emit Time 0.28s (± 3.49%) 0.28s (± 2.67%) ~ 0.27s 0.29s p=1.000 n=6
Total Time 88.31s (± 0.51%) 87.87s (± 0.29%) ~ 87.47s 88.16s p=0.093 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 2 🔻+2 (+ ∞%) ~ ~ p=0.001 n=6
Symbols 1,258,106 1,377,360 🔻+119,254 (+ 9.48%) ~ ~ p=0.001 n=6
Types 266,266 266,354 +88 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 3,146,474k (± 0.01%) 4,025,770k (± 0.01%) 🔻+879,295k (+27.95%) 4,024,687k 4,026,234k p=0.005 n=6
Parse Time 6.60s (± 1.26%) 10.13s (± 0.65%) 🔻+3.53s (+53.56%) 10.03s 10.22s p=0.005 n=6
Bind Time 2.27s (± 4.65%) 3.60s (± 0.70%) 🔻+1.32s (+58.21%) 3.56s 3.63s p=0.005 n=6
Check Time 42.95s (± 0.29%) 42.80s (± 0.11%) -0.14s (- 0.34%) 42.75s 42.88s p=0.031 n=6
Emit Time 3.43s (± 3.04%) 3.41s (± 1.53%) ~ 3.36s 3.51s p=0.936 n=6
Total Time 55.27s (± 0.22%) 59.97s (± 0.11%) 🔻+4.71s (+ 8.52%) 59.88s 60.04s p=0.005 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 2 🔻+2 (+ ∞%) ~ ~ p=0.001 n=6
Symbols 1,258,106 1,377,360 🔻+119,254 (+ 9.48%) ~ ~ p=0.001 n=6
Types 266,266 266,354 +88 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 2,496,181k (± 0.02%) 3,487,174k (± 0.02%) 🔻+990,993k (+39.70%) 3,486,268k 3,487,796k p=0.005 n=6
Parse Time 5.39s (± 0.38%) 8.29s (± 0.41%) 🔻+2.90s (+53.79%) 8.24s 8.32s p=0.005 n=6
Bind Time 1.73s (± 0.43%) 2.78s (± 0.81%) 🔻+1.04s (+60.25%) 2.73s 2.79s p=0.004 n=6
Check Time 35.89s (± 0.29%) 35.65s (± 0.24%) -0.24s (- 0.66%) 35.54s 35.76s p=0.008 n=6
Emit Time 3.03s (± 0.49%) 3.06s (± 1.73%) ~ 2.99s 3.14s p=0.378 n=6
Total Time 46.02s (± 0.31%) 49.76s (± 0.07%) 🔻+3.74s (+ 8.12%) 49.71s 49.81s p=0.005 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 1 🔻+1 (+ ∞%) ~ ~ p=0.001 n=6
Symbols 261,785 261,789 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,508 106,509 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 438,522k (± 0.01%) 438,514k (± 0.01%) ~ 438,496k 438,562k p=0.810 n=6
Parse Time 2.89s (± 0.74%) 2.90s (± 0.63%) ~ 2.87s 2.92s p=0.413 n=6
Bind Time 1.10s 1.10s (± 0.37%) ~ 1.09s 1.10s p=0.405 n=6
Check Time 15.72s (± 0.28%) 15.75s (± 0.20%) ~ 15.72s 15.80s p=0.334 n=6
Emit Time 1.31s (± 1.85%) 1.31s (± 1.70%) ~ 1.27s 1.33s p=1.000 n=6
Total Time 21.02s (± 0.26%) 21.05s (± 0.30%) ~ 20.96s 21.13s p=0.575 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 69 +1 (+ 1.47%) ~ ~ p=0.001 n=6
Symbols 225,919 225,919 ~ ~ ~ p=1.000 n=6
Types 94,415 94,415 ~ ~ ~ p=1.000 n=6
Memory used 371,075k (± 0.01%) 371,103k (± 0.01%) ~ 371,068k 371,136k p=0.173 n=6
Parse Time 2.91s (± 0.89%) 2.91s (± 0.64%) ~ 2.88s 2.93s p=1.000 n=6
Bind Time 1.59s (± 1.08%) 1.59s (± 1.67%) ~ 1.56s 1.63s p=0.685 n=6
Check Time 16.34s (± 0.30%) 16.37s (± 0.37%) ~ 16.27s 16.44s p=0.334 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.84s (± 0.30%) 20.86s (± 0.35%) ~ 20.75s 20.94s p=0.630 n=6
vscode - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 3,111,184 3,111,184 ~ ~ ~ p=1.000 n=6
Types 1,072,447 1,072,448 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,203,478k (± 0.00%) 3,203,472k (± 0.00%) ~ 3,203,299k 3,203,647k p=0.936 n=6
Parse Time 14.04s (± 0.29%) 14.05s (± 0.24%) ~ 14.01s 14.10s p=1.000 n=6
Bind Time 4.43s (± 0.31%) 4.43s (± 0.39%) ~ 4.40s 4.45s p=0.459 n=6
Check Time 85.88s (± 1.39%) 85.33s (± 0.42%) ~ 84.68s 85.63s p=0.521 n=6
Emit Time 23.41s (± 7.50%) 22.67s (± 0.48%) ~ 22.51s 22.85s p=0.687 n=6
Total Time 127.76s (± 2.31%) 126.48s (± 0.30%) ~ 125.81s 126.83s p=0.335 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 285,146 285,146 ~ ~ ~ p=1.000 n=6
Types 115,776 115,776 ~ ~ ~ p=1.000 n=6
Memory used 434,991k (± 0.04%) 434,874k (± 0.05%) ~ 434,494k 435,072k p=0.378 n=6
Parse Time 5.01s (± 1.56%) 5.04s (± 1.05%) ~ 4.97s 5.13s p=0.574 n=6
Bind Time 2.15s (± 0.80%) 2.15s (± 0.81%) ~ 2.12s 2.17s p=0.568 n=6
Check Time 22.75s (± 0.66%) 22.91s (± 1.78%) ~ 22.60s 23.72s p=0.575 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.91s (± 0.69%) 30.11s (± 1.25%) ~ 29.78s 30.84s p=0.521 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 540,222 540,222 ~ ~ ~ p=1.000 n=6
Types 181,145 181,145 ~ ~ ~ p=1.000 n=6
Memory used 483,839k (± 0.01%) 483,873k (± 0.01%) ~ 483,775k 483,966k p=0.298 n=6
Parse Time 4.16s (± 0.51%) 4.16s (± 0.24%) ~ 4.15s 4.17s p=0.565 n=6
Bind Time 1.45s (± 1.07%) 1.47s (± 0.72%) ~ 1.45s 1.48s p=0.078 n=6
Check Time 23.73s (± 0.25%) 23.66s (± 0.29%) ~ 23.58s 23.76s p=0.107 n=6
Emit Time 0.00s (±154.76%) 0.00s (±244.70%) ~ 0.00s 0.01s p=0.595 n=6
Total Time 29.35s (± 0.23%) 29.28s (± 0.23%) ~ 29.22s 29.39s p=0.092 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 400 repos with tsc comparing main and refs/pull/60120/merge:

Everything looks good!

@Andarist
Copy link
Contributor Author

Andarist commented Oct 3, 2024

For now, I fixed the self-check by adding an explicit annotation. The regression found here is unfortunate but I don't think this is a new problem, just see this journey through examples: TS playground. It feels like this didn't error previously out of sheer luck.

@jakebailey could you rerun perf tests? The current reported numbers for the self codebase are worrying but I don't see how this PR could affect parse or bind times. Was it just a fluke? 🤔

@jakebailey
Copy link
Member

@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 3, 2024

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

Command Status Results
perf test this faster ✅ 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 (v18.15.0, x64)
Errors 31 31 ~ ~ ~ p=1.000 n=6
Symbols 62,340 62,340 ~ ~ ~ p=1.000 n=6
Types 50,379 50,379 ~ ~ ~ p=1.000 n=6
Memory used 195,236k (± 0.91%) 193,442k (± 0.74%) ~ 192,793k 196,339k p=0.128 n=6
Parse Time 1.31s (± 1.04%) 1.31s (± 0.48%) ~ 1.30s 1.32s p=0.931 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.73s (± 0.50%) 9.75s (± 0.27%) ~ 9.71s 9.78s p=0.377 n=6
Emit Time 2.74s (± 0.74%) 2.71s (± 1.92%) ~ 2.62s 2.77s p=0.171 n=6
Total Time 14.50s (± 0.35%) 14.49s (± 0.38%) ~ 14.40s 14.55s p=0.872 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 33 ~ ~ ~ p=1.000 n=6
Symbols 947,886 947,886 ~ ~ ~ p=1.000 n=6
Types 410,840 410,840 ~ ~ ~ p=1.000 n=6
Memory used 1,224,599k (± 0.00%) 1,224,573k (± 0.00%) ~ 1,224,538k 1,224,616k p=0.230 n=6
Parse Time 6.66s (± 0.63%) 6.66s (± 0.63%) ~ 6.60s 6.72s p=0.572 n=6
Bind Time 1.88s (± 0.27%) 1.88s (± 0.27%) ~ 1.88s 1.89s p=1.000 n=6
Check Time 31.89s (± 0.30%) 31.79s (± 0.41%) -0.10s (- 0.31%) 31.65s 32.02s p=0.045 n=6
Emit Time 15.19s (± 0.27%) 15.16s (± 0.25%) ~ 15.12s 15.21s p=0.375 n=6
Total Time 55.63s (± 0.12%) 55.49s (± 0.24%) ~ 55.34s 55.62s p=0.092 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,536,287 2,536,287 ~ ~ ~ p=1.000 n=6
Types 935,644 935,644 ~ ~ ~ p=1.000 n=6
Memory used 2,371,250k (± 0.00%) 2,371,258k (± 0.00%) ~ 2,371,208k 2,371,313k p=0.936 n=6
Parse Time 9.51s (± 0.50%) 9.49s (± 0.18%) ~ 9.47s 9.51s p=0.569 n=6
Bind Time 2.19s (± 0.38%) 2.20s (± 0.19%) ~ 2.19s 2.20s p=0.285 n=6
Check Time 76.48s (± 0.17%) 76.64s (± 0.22%) ~ 76.34s 76.82s p=0.128 n=6
Emit Time 0.28s (± 4.71%) 0.29s (± 4.83%) ~ 0.27s 0.30s p=0.673 n=6
Total Time 88.46s (± 0.21%) 88.62s (± 0.20%) ~ 88.29s 88.80s p=0.173 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,106 1,258,111 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,266 266,261 -5 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,422,607k (± 0.04%) 2,422,554k (± 0.05%) ~ 2,421,673k 2,424,599k p=0.575 n=6
Parse Time 5.23s (± 0.38%) 5.17s (± 0.46%) -0.06s (- 1.08%) 5.14s 5.20s p=0.005 n=6
Bind Time 1.94s (± 0.51%) 1.94s (± 0.86%) ~ 1.92s 1.96s p=1.000 n=6
Check Time 35.46s (± 0.26%) 35.62s (± 0.48%) ~ 35.37s 35.81s p=0.090 n=6
Emit Time 3.08s (± 5.60%) 2.99s (± 1.71%) ~ 2.94s 3.08s p=0.128 n=6
Total Time 45.69s (± 0.53%) 45.73s (± 0.45%) ~ 45.47s 46.02s p=0.810 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,106 1,258,111 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,266 266,261 -5 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,525,700k (± 2.53%) 2,978,886k (±12.44%) 🔻+453,186k (+17.94%) 2,499,415k 3,218,999k p=0.045 n=6
Parse Time 6.52s (± 0.53%) 6.79s (± 2.28%) 🔻+0.27s (+ 4.06%) 6.58s 6.90s p=0.005 n=6
Bind Time 2.17s (± 1.01%) 2.13s (± 1.28%) -0.04s (- 2.00%) 2.09s 2.17s p=0.030 n=6
Check Time 43.12s (± 0.60%) 43.12s (± 0.47%) ~ 42.80s 43.40s p=0.810 n=6
Emit Time 3.49s (± 1.55%) 3.57s (± 3.78%) ~ 3.39s 3.78s p=0.378 n=6
Total Time 55.30s (± 0.34%) 55.60s (± 0.44%) +0.30s (+ 0.54%) 55.32s 56.02s p=0.045 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 261,785 261,790 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,508 106,503 -5 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 438,752k (± 0.01%) 438,774k (± 0.01%) ~ 438,670k 438,821k p=0.173 n=6
Parse Time 3.53s (± 0.59%) 3.54s (± 0.87%) ~ 3.51s 3.58s p=0.806 n=6
Bind Time 1.31s (± 0.96%) 1.31s (± 1.32%) ~ 1.29s 1.34s p=0.802 n=6
Check Time 18.85s (± 0.28%) 18.90s (± 0.45%) ~ 18.75s 19.00s p=0.170 n=6
Emit Time 1.54s (± 0.68%) 1.53s (± 1.62%) ~ 1.50s 1.57s p=0.256 n=6
Total Time 25.23s (± 0.21%) 25.28s (± 0.47%) ~ 25.08s 25.41s p=0.470 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 69 +1 (+ 1.47%) ~ ~ p=0.001 n=6
Symbols 225,919 225,919 ~ ~ ~ p=1.000 n=6
Types 94,415 94,415 ~ ~ ~ p=1.000 n=6
Memory used 371,088k (± 0.02%) 371,083k (± 0.01%) ~ 371,022k 371,150k p=0.936 n=6
Parse Time 2.91s (± 1.22%) 2.89s (± 1.13%) ~ 2.85s 2.95s p=0.686 n=6
Bind Time 1.59s (± 1.30%) 1.59s (± 1.35%) ~ 1.57s 1.63s p=0.868 n=6
Check Time 16.40s (± 0.29%) 16.44s (± 0.26%) ~ 16.39s 16.51s p=0.377 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.91s (± 0.26%) 20.93s (± 0.42%) ~ 20.86s 21.10s p=0.872 n=6
vscode - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 3,110,674 3,110,674 ~ ~ ~ p=1.000 n=6
Types 1,072,427 1,072,428 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,203,396k (± 0.00%) 3,203,344k (± 0.00%) ~ 3,203,260k 3,203,484k p=0.575 n=6
Parse Time 14.03s (± 0.26%) 14.13s (± 1.26%) ~ 14.02s 14.49s p=0.108 n=6
Bind Time 4.46s (± 2.16%) 4.43s (± 0.60%) ~ 4.39s 4.47s p=0.460 n=6
Check Time 85.71s (± 1.59%) 86.08s (± 2.28%) ~ 84.44s 89.11s p=1.000 n=6
Emit Time 23.40s (± 8.00%) 24.11s (± 9.65%) ~ 22.52s 27.30s p=1.000 n=6
Total Time 127.60s (± 1.47%) 128.76s (± 2.49%) ~ 125.92s 133.80s p=0.689 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 285,146 285,146 ~ ~ ~ p=1.000 n=6
Types 115,776 115,776 ~ ~ ~ p=1.000 n=6
Memory used 434,987k (± 0.03%) 434,968k (± 0.01%) ~ 434,858k 435,014k p=1.000 n=6
Parse Time 5.05s (± 1.13%) 5.02s (± 1.34%) ~ 4.93s 5.09s p=0.746 n=6
Bind Time 2.14s (± 1.38%) 2.15s (± 1.14%) ~ 2.13s 2.19s p=0.402 n=6
Check Time 22.70s (± 0.43%) 22.68s (± 0.57%) ~ 22.45s 22.81s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.89s (± 0.45%) 29.85s (± 0.66%) ~ 29.51s 30.05s p=1.000 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 540,222 540,222 ~ ~ ~ p=1.000 n=6
Types 181,145 181,145 ~ ~ ~ p=1.000 n=6
Memory used 483,816k (± 0.02%) 483,838k (± 0.01%) ~ 483,771k 483,886k p=0.810 n=6
Parse Time 4.17s (± 0.45%) 4.16s (± 0.28%) ~ 4.15s 4.18s p=0.554 n=6
Bind Time 1.46s (± 1.28%) 1.47s (± 0.82%) ~ 1.45s 1.48s p=0.323 n=6
Check Time 23.78s (± 1.35%) 23.75s (± 0.47%) ~ 23.59s 23.85s p=0.630 n=6
Emit Time 0.00s (±154.76%) 0.00s (±244.70%) ~ 0.00s 0.01s p=0.595 n=6
Total Time 29.41s (± 1.11%) 29.37s (± 0.41%) ~ 29.20s 29.48s p=0.520 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

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

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

undefined is narrowed away incorrectly

3 participants