Skip to content

src: implement v8 array iteration using the new callback-based API - #51758

Closed
joyeecheung wants to merge 3 commits into
nodejs:mainfrom
joyeecheung:array-iteration
Closed

src: implement v8 array iteration using the new callback-based API#51758
joyeecheung wants to merge 3 commits into
nodejs:mainfrom
joyeecheung:array-iteration

Conversation

@joyeecheung

Copy link
Copy Markdown
Member

src: implement v8 array iteration using the new callback-based API

Using this to iterate over an array can be faster than calling
Array::Get repeatedly. Local experiment shows that this is faster
once the array size is bigger than 2.

src: use callback-based array iteration in Blob

Using this to iterate over an array can be faster than calling
Array::Get repeatedly. Local experiment shows that this is faster
once the array size is bigger than 2.
@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Feb 14, 2024
Comment threadsrc/util.h Outdated
@joyeecheungjoyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 17, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 17, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadsrc/util-inl.h
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadsrc/util-inl.h
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

joyeecheung added a commit that referenced this pull request Feb 22, 2024
Using this to iterate over an array can be faster than calling
Array::Get repeatedly. Local experiment shows that this is faster
once the array size is bigger than 2.
PR-URL: #51758
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
joyeecheung added a commit that referenced this pull request Feb 22, 2024
PR-URL: #51758
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@joyeecheung

Copy link
Copy Markdown
MemberAuthor

Landed in d51a74a...1a8ae9d

@marco-ippolito

marco-ippolito commented Feb 26, 2024

Copy link
Copy Markdown
Member

@joyeecheung can you backport on 21 please, it seems to fail compilation https://github.com/nodejs/node/actions/runs/8049258088/job/21982250897

@targos

Copy link
Copy Markdown
Member

This can't be backported as it relies on V8 API that doesn't exist on v21.x

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

Labels

c++Issues and PRs that require attention from people who are familiar with C++.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@joyeecheung@nodejs-github-bot@marco-ippolito@targos@anonrig@legendecas