GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — buffer: re-enable Fast API for Buffer.write by ronag · Pull Request #54526 · nodejs/node Conversation
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Having a non-deterministic test is unpleasant.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You can trigger fast api call using the method @targos implemented in his previous pull requests.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This looks to me. I wish we could use a deterministic test. Having to loop a million times to trigger and issue is both slow and error prone.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #54526 +/- ## ========================================== - Coverage 87.61% 87.60% -0.01% ========================================== Files 650 650 Lines 182835 182889 +54 Branches 35382 35389 +7 ========================================== + Hits 160185 160227 +42 - Misses 15925 15927 +2 - Partials 6725 6735 +10
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Some lint issues but otherwise LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
With the current commits, the following test will fail: let i = 0; const testStr = "\xc2\x80"; // when stored in 1-byte chars, this is a valid UTF-8 encoding const expected = Buffer.from(testStr).toString("hex"); for(; i < 1_000_000; i++) { const buf = Buffer.from(testStr); const ashex = buf.toString("hex"); if (ashex !== expected) { console.log(`Decoding changed in iteration ${i} when changing to FastWriteStringUTF8, got ${ashex}, expected ${expected}`); break; } } if(i<1_000_000) { console.error("FAILED after %d iterations",i); } else console.log("PASSED after %d iterations",i); The source string is stored as UTF16 (compressed to 1 byte), but still needs to be converted to UTF-8. The fast path can only be implemented as memcpy when only characters from the range 0-127 are present. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I thought |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
< when only characters from the range 0-127 are present @lemira does simdutf have this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Commit Queue failed- Loading data for nodejs/node/pull/54526 ✔ Done loading data for nodejs/node/pull/54526 ----------------------------------- PR info ------------------------------------ Title buffer: validate UTF8 on fast path (#54526) Author Robert Nagy <[email protected]> (@ronag) Branch ronag:fast-utf8-2 -> nodejs:main Labels buffer, c++, author ready, needs-ci Commits 1 - buffer: validate UTF8 on fast path Committers 1 - Robert Nagy <[email protected]> PR-URL: https://github.com/nodejs/node/pull/54526 Fixes: https://github.com/nodejs/node/issues/54521 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/54526 Fixes: https://github.com/nodejs/node/issues/54521 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 23 Aug 2024 14:34:31 GMT ✔ Approvals: 6 ✔ - Daniel Lemire (@lemire): https://github.com/nodejs/node/pull/54526#pullrequestreview-2257470621 ✔ - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/54526#pullrequestreview-2273156047 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/54526#pullrequestreview-2258976699 ✔ - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/54526#pullrequestreview-2258958504 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/54526#pullrequestreview-2272343097 ✔ - Paolo Insogna (@ShogunPanda) (TSC): https://github.com/nodejs/node/pull/54526#pullrequestreview-2260113366 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2024-08-30T13:34:03Z: https://ci.nodejs.org/job/node-test-pull-request/61707/ ℹ Last Benchmark CI on 2024-08-30T10:28:48Z: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1626/ - Querying data for job/node-test-pull-request/61707/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/10637813307 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Given the repeated activity since the failed commit, I assume it is known that the commit-queue originally failed, so I removed the label. Feel free to re-add. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Correct me if I'm wrong, but shouldn't the "PR-URL" meta be added by the bot? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
You're right. @ronag please remove the PR-URL from the commit. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Re-enables fast Fast API for Buffer.write after fixing UTF8 handling. Fixes: nodejs#54521
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in dc74f17 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.