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

Add compatible overloads that accept ArrayBuffer to BigInt64Array/BigUint64Array #60391

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

rbuckton
Copy link
Member

@rbuckton rbuckton commented Nov 1, 2024

This adds a missing overload common to other typed arrays to ensure BigUint64ArrayConstructor and BigInt64ArrayConstructor are consistent.

Fixes #60367

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Nov 1, 2024
| Float64ArrayConstructor
| BigInt64ArrayConstructor

export function makeTypedArray(buffer: ArrayBuffer, ctr: TypedArrayConstructor) {
Copy link
Member Author

Choose a reason for hiding this comment

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

NOTE: There is no output because this is only check for an error. Without the above changes to es2020.bigint.d.ts, an errors.txt is generated.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 1, 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/60391/merge:

Everything looks good!

@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 192,792k (± 0.01%) 193,504k (± 0.72%) ~ 192,792k 196,340k p=0.066 n=6
Parse Time 1.31s (± 0.79%) 1.32s (± 0.80%) ~ 1.30s 1.33s p=0.931 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.74s (± 0.11%) 9.74s (± 0.29%) ~ 9.71s 9.78s p=0.871 n=6
Emit Time 2.72s (± 1.14%) 2.72s (± 0.83%) ~ 2.68s 2.75s p=0.328 n=6
Total Time 14.49s (± 0.25%) 14.49s (± 0.29%) ~ 14.41s 14.52s p=0.808 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 33 ~ ~ ~ p=1.000 n=6
Symbols 947,886 947,888 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 410,840 410,840 ~ ~ ~ p=1.000 n=6
Memory used 1,224,634k (± 0.00%) 1,224,626k (± 0.00%) ~ 1,224,569k 1,224,676k p=0.575 n=6
Parse Time 6.65s (± 0.69%) 6.67s (± 0.78%) ~ 6.61s 6.75s p=0.688 n=6
Bind Time 1.88s (± 0.29%) 1.88s (± 0.40%) ~ 1.87s 1.89s p=0.476 n=6
Check Time 31.77s (± 0.37%) 31.84s (± 0.24%) ~ 31.73s 31.94s p=0.334 n=6
Emit Time 15.26s (± 0.30%) 15.19s (± 0.35%) -0.07s (- 0.46%) 15.10s 15.25s p=0.044 n=6
Total Time 55.56s (± 0.24%) 55.57s (± 0.21%) ~ 55.40s 55.72s p=0.936 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,494,969 2,494,971 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 908,592 908,592 ~ ~ ~ p=1.000 n=6
Memory used 2,307,140k (± 0.00%) 2,307,156k (± 0.00%) ~ 2,307,101k 2,307,197k p=0.575 n=6
Parse Time 9.32s (± 0.25%) 9.32s (± 0.21%) ~ 9.30s 9.35s p=0.623 n=6
Bind Time 2.13s (± 0.46%) 2.14s (± 0.38%) ~ 2.12s 2.14s p=0.336 n=6
Check Time 75.11s (± 0.56%) 75.29s (± 0.39%) ~ 74.90s 75.63s p=0.378 n=6
Emit Time 0.28s (± 1.45%) 0.28s (± 1.86%) ~ 0.27s 0.28s p=0.114 n=6
Total Time 86.84s (± 0.49%) 87.03s (± 0.33%) ~ 86.63s 87.36s p=0.378 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,426 1,258,454 +28 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,328 266,328 ~ ~ ~ p=1.000 n=6
Memory used 2,423,526k (± 0.01%) 2,422,790k (± 0.01%) -736k (- 0.03%) 2,422,427k 2,423,039k p=0.013 n=6
Parse Time 5.21s (± 1.07%) 5.19s (± 1.17%) ~ 5.13s 5.29s p=0.470 n=6
Bind Time 1.92s (± 0.61%) 1.93s (± 0.64%) ~ 1.92s 1.95s p=0.655 n=6
Check Time 35.51s (± 0.24%) 35.63s (± 0.53%) ~ 35.40s 35.90s p=0.230 n=6
Emit Time 3.01s (± 1.54%) 3.02s (± 1.34%) ~ 2.95s 3.07s p=0.936 n=6
Total Time 45.66s (± 0.28%) 45.76s (± 0.49%) ~ 45.54s 46.14s p=0.471 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,426 1,258,454 +28 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,328 266,328 ~ ~ ~ p=1.000 n=6
Memory used 2,740,468k (±13.52%) 2,500,439k (± 0.03%) ~ 2,499,266k 2,501,158k p=0.093 n=6
Parse Time 6.68s (± 2.98%) 6.55s (± 0.55%) ~ 6.52s 6.62s p=0.336 n=6
Bind Time 2.16s (± 2.86%) 2.17s (± 1.43%) ~ 2.13s 2.20s p=0.936 n=6
Check Time 43.35s (± 0.25%) 43.18s (± 0.43%) ~ 42.84s 43.36s p=0.066 n=6
Emit Time 3.50s (± 2.02%) 3.55s (± 5.74%) ~ 3.39s 3.92s p=0.873 n=6
Total Time 55.69s (± 0.48%) 55.44s (± 0.62%) ~ 54.92s 55.92s p=0.173 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 261,749 261,751 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,472 106,472 ~ ~ ~ p=1.000 n=6
Memory used 438,877k (± 0.01%) 438,827k (± 0.01%) ~ 438,794k 438,890k p=0.230 n=6
Parse Time 3.55s (± 0.58%) 3.54s (± 0.69%) ~ 3.50s 3.57s p=0.413 n=6
Bind Time 1.32s (± 0.92%) 1.31s (± 1.08%) ~ 1.29s 1.33s p=0.458 n=6
Check Time 18.94s (± 0.19%) 18.90s (± 0.25%) ~ 18.82s 18.96s p=0.195 n=6
Emit Time 1.53s (± 1.14%) 1.54s (± 1.26%) ~ 1.51s 1.56s p=0.626 n=6
Total Time 25.34s (± 0.24%) 25.29s (± 0.27%) ~ 25.19s 25.40s p=0.199 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,919 225,921 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 94,415 94,415 ~ ~ ~ p=1.000 n=6
Memory used 371,108k (± 0.02%) 371,095k (± 0.01%) ~ 371,058k 371,144k p=1.000 n=6
Parse Time 2.88s (± 0.93%) 2.88s (± 0.69%) ~ 2.85s 2.91s p=0.871 n=6
Bind Time 1.60s (± 1.35%) 1.59s (± 1.45%) ~ 1.56s 1.63s p=0.746 n=6
Check Time 16.31s (± 0.21%) 16.36s (± 0.20%) +0.05s (+ 0.31%) 16.32s 16.40s p=0.036 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.78s (± 0.32%) 20.83s (± 0.19%) ~ 20.77s 20.87s p=0.199 n=6
vscode - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 3,130,783 3,130,785 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 1,079,190 1,079,191 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,219,706k (± 0.01%) 3,219,574k (± 0.01%) ~ 3,219,039k 3,220,081k p=0.471 n=6
Parse Time 14.07s (± 0.43%) 14.10s (± 0.69%) ~ 13.96s 14.22s p=0.810 n=6
Bind Time 4.50s (± 2.50%) 4.55s (± 2.53%) ~ 4.45s 4.71s p=0.471 n=6
Check Time 85.89s (± 1.68%) 85.05s (± 0.59%) ~ 84.22s 85.63s p=0.298 n=6
Emit Time 26.14s (± 4.11%) 26.56s (± 3.81%) ~ 25.02s 27.51s p=0.470 n=6
Total Time 130.60s (± 1.60%) 130.27s (± 0.94%) ~ 128.63s 131.72s p=0.936 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 288,121 288,123 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 116,929 116,930 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 439,559k (± 0.03%) 439,515k (± 0.02%) ~ 439,400k 439,599k p=0.575 n=6
Parse Time 4.06s (± 1.03%) 4.07s (± 0.81%) ~ 4.03s 4.11s p=0.935 n=6
Bind Time 1.75s (± 0.91%) 1.76s (± 0.72%) ~ 1.74s 1.77s p=0.402 n=6
Check Time 18.68s (± 0.47%) 18.70s (± 0.41%) ~ 18.61s 18.80s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.50s (± 0.48%) 24.52s (± 0.35%) ~ 24.43s 24.64s p=0.810 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 543,130 543,132 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 181,889 181,889 ~ ~ ~ p=1.000 n=6
Memory used 485,521k (± 0.01%) 485,566k (± 0.01%) ~ 485,512k 485,637k p=0.298 n=6
Parse Time 4.18s (± 0.80%) 4.20s (± 0.56%) ~ 4.16s 4.23s p=0.561 n=6
Bind Time 1.46s (± 0.57%) 1.47s (± 1.03%) ~ 1.46s 1.50s p=0.276 n=6
Check Time 23.76s (± 0.48%) 23.69s (± 0.32%) ~ 23.57s 23.79s p=0.377 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.40s (± 0.31%) 29.36s (± 0.28%) ~ 29.24s 29.46s p=0.688 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/60391/merge:

Everything looks good!

@rbuckton rbuckton merged commit 11b2930 into main Nov 1, 2024
31 checks passed
@rbuckton rbuckton deleted the fix60367 branch November 1, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

In 5.7 beta, BigInt64ArrayConstructor mismatches with other typed arrays
3 participants