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: replace deprecated v8::FastApiTypedArray #54103

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

Conversation

targos
Copy link
Member

@targos targos commented Jul 29, 2024

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Jul 29, 2024
@targos targos marked this pull request as draft July 29, 2024 14:33
@targos
Copy link
Member Author

targos commented Jul 29, 2024

I'm not sure about the changes here, but I can update the other uses if they are correct.

@targos
Copy link
Member Author

targos commented Jul 29, 2024

Copy link

codecov bot commented Jul 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 87.07%. Comparing base (01cf9bc) to head (895a3fc).
Report is 26 commits behind head on main.

Files Patch % Lines
src/node_buffer.cc 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54103      +/-   ##
==========================================
- Coverage   87.07%   87.07%   -0.01%     
==========================================
  Files         643      643              
  Lines      181583   181587       +4     
  Branches    34886    34887       +1     
==========================================
- Hits       158114   158109       -5     
+ Misses      16751    16748       -3     
- Partials     6718     6730      +12     
Files Coverage Δ
src/node_external_reference.h 100.00% <ø> (ø)
src/node_buffer.cc 74.01% <0.00%> (-0.21%) ⬇️

... and 27 files with indirect coverage changes

@ronag
Copy link
Member

ronag commented Jul 29, 2024

Seems significantly slower. I would propose we stick with the deprecated api until there is a faster alternative or until it's been removed.

@ronag
Copy link
Member

ronag commented Jul 29, 2024

I had similar results with the copy pr

@@ -1129,14 +1129,16 @@ void SlowIndexOfNumber(const FunctionCallbackInfo<Value>& args) {
}

int32_t FastIndexOfNumber(v8::Local<v8::Value>,
const FastApiTypedArray<uint8_t>& buffer,
v8::Local<v8::Object> buffer,
Copy link
Member

Choose a reason for hiding this comment

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

This is actually slower in V8 v12.8 (by a significant margin).

@targos targos added the blocked PRs that are blocked by other issues or PRs. label Aug 1, 2024
@ronag ronag mentioned this pull request Oct 21, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PRs that are blocked by other issues or PRs. buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants