镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Avoid augmenting subarrays post-ES2016 - #351

Open
chjj wants to merge 1 commit into
feross:masterfrom
chjj:subarray-calls-child
Open

chjj wants to merge 1 commit into
feross:masterfrom
chjj:subarray-calls-child

Conversation

@chjj

@chjj chjj commented Feb 4, 2024

Copy link
Copy Markdown
Contributor

Not sure whether this helps performance, but subarrays only need augmenting pre-ES2016. Might be good to avoid it if we can.

The code detects whether TypedArray#subarray calls the child class' constructor (a la ES2016) at the end of the file -- once the Buffer prototype is completely setup.

@chjj
chjj force-pushed the subarray-calls-child branch from b445655 to 28eab2c Compare February 4, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant