Uh oh!
There was an error while loading. Please reload this page.
fs: dispatch ASCII and Latin1 via simdutf in ReadFileUtf8 - #63370
fs: dispatch ASCII and Latin1 via simdutf in ReadFileUtf8#63370mertcanaltin wants to merge 1 commit into
Conversation
nodejs-github-bot
commented
May 16, 2026
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #63370 +/- ##
==========================================
- Coverage 90.07% 90.06% -0.02%
==========================================
Files 714 714 Lines 225564 225740 +176 Branches 42656 42718 +62 ==========================================
+ Hits 203177 203306 +129 - Misses 14189 14221 +32 - Partials 8198 8213 +15
🚀 New features to boost your workflow:
|
addaleax
left a comment
There was a problem hiding this comment.
Why would we make this change specifically for fs and not as part of the general ToV8Value() conversion or StringBytes?
Signed-off-by: Mert Can Altin <mertgold60@gmail.com>
cdeaa76 to
deaa5e1Comparemertcanaltin
commented
May 18, 2026
Sure, I applied now, new benchmark results: have a one regresion, I solving today, |
nodejs-github-bot
commented
May 19, 2026
nodejs-github-bot
commented
May 26, 2026
Signed-off-by: Mert Can Altin <mertgold60@gmail.com> PR-URL: #63370 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
addaleax
commented
May 27, 2026
Landed in 770385a |
Signed-off-by: Mert Can Altin <mertgold60@gmail.com> PR-URL: #63370 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Signed-off-by: Mert Can Altin <mertgold60@gmail.com> PR-URL: #63370 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
In fs.readFileSync(path, 'utf8'), I dispatch the V8 string creation through simdutf. ASCII and Latin1-fits utf-8 use one-byte V8 strings, multibyte goes through simdutf to UTF-16, invalid utf-8 falls back to V8.
@nodejs/fs, @anonrig@addaleax, @lemire@mcollina
Bench results (gist): https://gist.github.com/mertcanaltin/a0096c3fad387d0bace821938754af44