Title: lib: short-circuit WebIDL BufferSource SAB check by panva · Pull Request #62833 · nodejs/node · GitHub
Open Graph Title: lib: short-circuit WebIDL BufferSource SAB check by panva · Pull Request #62833 · nodejs/node
X Title: lib: short-circuit WebIDL BufferSource SAB check by panva · Pull Request #62833 · nodejs/node
Description: Avoid the C++ isSharedArrayBuffer binding call on the BufferSource and ArrayBufferView converter hot path by brand-checking the backing buffer via the ArrayBuffer.prototype.byteLength getter: the getter succeeds on every real ArrayBuffer (the common case) and throws only on SharedArrayBuffers, mirroring the brand check V8 performs internally. This preserves the existing SharedArrayBuffer rejection semantics independent of the receiver's prototype chain, including pathological cases such as a SharedArrayBuffer whose prototype has been reassigned to ArrayBuffer.prototype. Local: before ops/sec after ops/sec speedup input="arraybuffer" 16,889,535 16,892,386 equal input="buffer" 14,935,801 109,679,440 7.34x input="dataview" 16,317,802 175,225,973 10.74x input="uint8array" 15,414,470 112,565,076 7.30x input="uint8clampedarray" 14,872,961 109,705,509 7.38x input="int8array" 15,157,350 107,936,966 7.12x input="uint16array" 15,090,143 110,854,507 7.35x input="int16array" 14,903,084 111,035,797 7.45x input="uint32array" 14,646,015 111,284,993 7.60x input="int32array" 14,516,087 110,004,950 7.58x input="float16array" 15,233,858 109,795,595 7.21x input="float32array" 15,345,072 111,418,806 7.26x input="float64array" 14,764,074 110,252,063 7.47x input="bigint64array" 15,217,740 108,292,498 7.12x input="biguint64array" 15,027,624 110,549,409 7.36x CI Benchmark: #62833 (comment) Bench pre a136367 before ops/sec after ops/sec speedup input="arraybuffer" 16,889,535 16,890,841 equal input="buffer" 14,935,801 125,791,768 8.42x input="dataview" 16,317,802 177,117,590 10.85x input="uint8array" 15,414,470 125,996,487 8.17x input="uint8clampedarray" 14,872,961 124,526,604 8.37x input="int8array" 15,157,350 124,766,713 8.23x input="uint16array" 15,090,143 123,827,379 8.21x input="int16array" 14,903,084 120,681,548 8.10x input="uint32array" 14,646,015 120,610,045 8.23x input="int32array" 14,516,087 120,635,143 8.31x input="float16array" 15,233,858 120,150,187 7.89x input="float32array" 15,345,072 124,486,881 8.11x input="float64array" 14,764,074 122,339,186 8.29x input="bigint64array" 15,217,740 125,704,732 8.26x input="biguint64array" 15,027,624 125,533,190 8.35x
Open Graph Description: Avoid the C++ isSharedArrayBuffer binding call on the BufferSource and ArrayBufferView converter hot path by brand-checking the backing buffer via the ArrayBuffer.prototype.byteLength getter: the g...
X Description: Avoid the C++ isSharedArrayBuffer binding call on the BufferSource and ArrayBufferView converter hot path by brand-checking the backing buffer via the ArrayBuffer.prototype.byteLength getter: the g...
Opengraph URL: https://github.com/nodejs/node/pull/62833
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:301bde20-6da1-959b-66cd-77065f32d32f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B3C0:6A6D7:4F580E:6AC84E:6A4C78AB |
| html-safe-nonce | 4c4ad4e3056dab3a196bfd02141855e0860acf8ac8c07a0e0c32add6434fcbc8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0MwOjZBNkQ3OjRGNTgwRTo2QUM4NEU6NkE0Qzc4QUIiLCJ2aXNpdG9yX2lkIjoiMzg1ODEzNzEyNjI3Mzg0MTMyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 784b2913616071c2f459587602406dc033307890b470f356a487da8b8d1b07f7 |
| hovercard-subject-tag | pull_request:3552614993 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/62833/files |
| twitter:image | https://avatars.githubusercontent.com/u/241506?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/241506?s=400&v=4 |
| og:image:alt | Avoid the C++ isSharedArrayBuffer binding call on the BufferSource and ArrayBufferView converter hot path by brand-checking the backing buffer via the ArrayBuffer.prototype.byteLength getter: the g... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56ac743bebb13694b888673bb7257f4b97a4b7fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width