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

src: avoid copy by using std::views::keys #56080

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Nov 29, 2024

We can leverage C++20 and use std::views::keys() which returns std::ranges::elements_view<T, S> which avoids creating a vector for GetBuiltinIds()

@anonrig anonrig added dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Nov 29, 2024
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-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 Nov 29, 2024
@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Nov 29, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 29, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.00%. Comparing base (4efb7ae) to head (5d6ffea).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/util-inl.h 76.92% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56080      +/-   ##
==========================================
+ Coverage   87.99%   88.00%   +0.01%     
==========================================
  Files         656      656              
  Lines      188988   188994       +6     
  Branches    35988    35989       +1     
==========================================
+ Hits       166302   166328      +26     
+ Misses      15848    15838      -10     
+ Partials     6838     6828      -10     
Files with missing lines Coverage Δ
src/node_builtins.cc 78.20% <100.00%> (-0.47%) ⬇️
src/node_builtins.h 100.00% <100.00%> (ø)
src/util.h 91.22% <ø> (ø)
src/util-inl.h 83.89% <76.92%> (+0.03%) ⬆️

... and 23 files with indirect coverage changes

@anonrig
Copy link
Member Author

anonrig commented Nov 29, 2024

cc @nodejs/build this is blocked by the macOS infra.

14:01:20 ../src/util.h:45:10: fatal error: 'ranges' file not found
14:01:20 #include <ranges>

@anonrig anonrig added the blocked PRs that are blocked by other issues or PRs. label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. blocked PRs that are blocked by other issues or PRs. c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants