| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
Sorry, something went wrong.
- Increase the number of iteration to 1e6 to reduce flakes. 1e4 can introduce flakes even when comparing the main branch against itself - Replace the 1024 * 32 length test with 1024 * 8 since it would otherwise take too long to complete. Remove the 16 length test since it's not too different from 32. - Check the results of the encoding methods at the end.
Move the bindings used by TextEncoder to a new binding for more self-contained code.
Getting the buffer from a TypedArray created from the JS land incurs a copy. For encodeInto() results we can just use an AliasedArray and let the binding always own the store.
|
Rebased to fix merge conflict |
Sorry, something went wrong.
Sorry, something went wrong.
|
cc @nodejs/buffer @nodejs/cpp-reviewers can I have some reviews please? Thanks. |
Sorry, something went wrong.
There was a problem hiding this comment.
The code change LGTM (% lint fixes) but I'm curious about this part:
Getting the buffer from a TypedArray created from the JS land
incurs a copy.
Where does the copy take place?
Sorry, something went wrong.
v8::ArrayBufferView::Buffer(). |
Sorry, something went wrong.
|
Fixed linter error (looks like the bot is not working again: https://ci.nodejs.org/job/node-test-pull-request/50249/) |
Sorry, something went wrong.
Sorry, something went wrong.
- Increase the number of iteration to 1e6 to reduce flakes. 1e4 can introduce flakes even when comparing the main branch against itself - Replace the 1024 * 32 length test with 1024 * 8 since it would otherwise take too long to complete. Remove the 16 length test since it's not too different from 32. - Check the results of the encoding methods at the end. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
Move the bindings used by TextEncoder to a new binding for more self-contained code. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
Getting the buffer from a TypedArray created from the JS land incurs a copy. For encodeInto() results we can just use an AliasedArray and let the binding always own the store. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
|
this commit has landed without a passing CI/GH actions, introducing a lint error: #47007 |
Sorry, something went wrong.
|
Linter issue is addressed in #47003. |
Sorry, something went wrong.
|
The CI was actually passing in https://ci.nodejs.org/job/node-test-pull-request/50258/, which included the fixup commit that should remove the unused using statement causing the lint error: 4ea7f2e. But somehow git was only able to apply that fixup commit partially during landing, and I didn't see any warnings? |
Sorry, something went wrong.
- Increase the number of iteration to 1e6 to reduce flakes. 1e4 can introduce flakes even when comparing the main branch against itself - Replace the 1024 * 32 length test with 1024 * 8 since it would otherwise take too long to complete. Remove the 16 length test since it's not too different from 32. - Check the results of the encoding methods at the end. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
Move the bindings used by TextEncoder to a new binding for more self-contained code. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
Getting the buffer from a TypedArray created from the JS land incurs a copy. For encodeInto() results we can just use an AliasedArray and let the binding always own the store. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
- Increase the number of iteration to 1e6 to reduce flakes. 1e4 can introduce flakes even when comparing the main branch against itself - Replace the 1024 * 32 length test with 1024 * 8 since it would otherwise take too long to complete. Remove the 16 length test since it's not too different from 32. - Check the results of the encoding methods at the end. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
Move the bindings used by TextEncoder to a new binding for more self-contained code. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
Getting the buffer from a TypedArray created from the JS land incurs a copy. For encodeInto() results we can just use an AliasedArray and let the binding always own the store. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
|
@joyeecheung This breaks the build when landing in v18.x - do you mind opening a backport PR? |
Sorry, something went wrong.
| CHECK_NOT_NULL(binding); | ||
| } | ||
|
|
||
| void BindingData::EncodeInto(const FunctionCallbackInfo<Value>& args) { |
There was a problem hiding this comment.
Out of curiosity I exploring places where fast API could be applied, came across this function and PR, I experimented a bit it seems v8::FastApiTypedArray<uint8_t>& is indeed supported and it does get caught in fast call, but I am not sure how one could extract ->Buffer() from v8::FastApiTypedArray<uint8_t>&, is that even possible? just wondering do let me know your thoughts cc @anonrig @joyeecheung
Thank You!
Sorry, something went wrong.
- Increase the number of iteration to 1e6 to reduce flakes. 1e4 can introduce flakes even when comparing the main branch against itself - Replace the 1024 * 32 length test with 1024 * 8 since it would otherwise take too long to complete. Remove the 16 length test since it's not too different from 32. - Check the results of the encoding methods at the end. PR-URL: #46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
- Increase the number of iteration to 1e6 to reduce flakes. 1e4 can introduce flakes even when comparing the main branch against itself - Replace the 1024 * 32 length test with 1024 * 8 since it would otherwise take too long to complete. Remove the 16 length test since it's not too different from 32. - Check the results of the encoding methods at the end. PR-URL: nodejs/node#46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
- Increase the number of iteration to 1e6 to reduce flakes. 1e4 can introduce flakes even when comparing the main branch against itself - Replace the 1024 * 32 length test with 1024 * 8 since it would otherwise take too long to complete. Remove the 16 length test since it's not too different from 32. - Check the results of the encoding methods at the end. PR-URL: nodejs/node#46658 Reviewed-By: Darshan Sen <raisinten@gmail.com>
| Back | FazBrowse Home | New Git URL |
The first commits comes from #46620
benchmark: stablize encode benchmark
can introduce flakes even when comparing the main branch
against itself
otherwise take too long to complete.
src: move encoding bindings to a new binding
Move the bindings used by TextEncoder to a new binding for
more self-contained code.
encoding: use AliasedUint32Array for encodeInto results
Getting the buffer from a TypedArray created from the JS land
incurs a copy. For encodeInto() results we can just use an
AliasedArray and let the binding always own the store.