Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
e54ddf8
src: support configurable snapshot
joyeecheung Oct 28, 2023
efa13e1
doc: add documentation for --build-snapshot-config
addaleax Nov 16, 2023
e2f8d74
deps: update zlib to 1.3.0.1-motley-dd5fc13
nodejs-github-bot Dec 16, 2023
2c227b0
doc: fix simdjson wrong link
marco-ippolito Dec 16, 2023
3f4fd6e
watch: fix infinite loop when passing --watch=true flag
pulkit-30 Dec 16, 2023
e5017a5
crypto: update CryptoKey symbol properties
panva Nov 25, 2023
13a1241
assert,crypto: make KeyObject and CryptoKey testable for equality
panva Nov 24, 2023
63db82a
test_runner: fixed to run after hook if before throws an error
pulkit-30 Dec 17, 2023
89eee77
http2: addtl http/2 settings
martenrichter Dec 18, 2023
1c71435
doc: fix `TestsStream` parent class
Dec 18, 2023
e636d83
doc: correct note on behavior of stats.isDirectory
NReilingh Dec 18, 2023
5b229d7
fs: validate fd synchronously on c++
anonrig Dec 18, 2023
df8927a
doc: mention native addons are restricted in pm
RafaelGSS Dec 19, 2023
c96ef65
tools: update eslint to 8.56.0
nodejs-github-bot Dec 19, 2023
b2135ae
node-api: segregate nogc APIs from rest via type system
gabrielschulhof Dec 19, 2023
a325746
http: do not override user-provided options object
KuthorX Dec 19, 2023
f9d4e07
doc: remove version from `maintaining-dependencies.md`
aduh95 Dec 19, 2023
d0d2faf
tools: update lint-md-dependencies to [email protected]
nodejs-github-bot Dec 19, 2023
3ecc7dc
deps: update acorn-walk to 8.3.0
nodejs-github-bot Oct 29, 2023
75e5615
deps: update acorn-walk to 8.3.1
nodejs-github-bot Dec 10, 2023
8a2dd93
src: implement FastByteLengthUtf8 with simdutf::utf8_length_from_latin1
lemire Dec 19, 2023
d7c2572
test: fix flakiness in worker*.test-free-called
MrJithil Dec 19, 2023
5453abd
doc: set exit code in custom test runner example
mcollina Dec 20, 2023
7421467
fs: improve mkdtemp performance for buffer prefix
anonrig Dec 20, 2023
6d1bfcb
deps: update googletest to 530d5c8
nodejs-github-bot Dec 20, 2023
a07d6e2
deps: update simdjson to 3.6.3
nodejs-github-bot Dec 10, 2023
3759491
tools: check timezone current version
marco-ippolito Dec 20, 2023
7e9a0b1
test: use tmpdir.refresh() in test-esm-json.mjs
lpinca Dec 20, 2023
8a2178c
test: use tmpdir.refresh() in test-esm-loader-resolve-type.mjs
lpinca Dec 20, 2023
4b19e62
doc: remove ambiguous 'considered'
Trott Dec 20, 2023
e4be5b6
net: add connection attempt events
ShogunPanda Dec 21, 2023
83a99cc
meta: update artifact actions to v4
targos Dec 21, 2023
c13a5c0
doc: mention node:wasi in the Threat Model
RafaelGSS Dec 21, 2023
b6f232e
test: add URL tests to fs-read in pm
RafaelGSS Dec 21, 2023
7e98349
test: replace forEach with for-of in test-v8-serders.js
iannonoss Dec 21, 2023
3310095
repl: fix prepareStackTrace frames array order
legendecas Nov 21, 2023
291265c
lib: expose default prepareStackTrace
legendecas Nov 20, 2023
ec6fcff
doc: fix limitations and known issues in pm
RafaelGSS Dec 21, 2023
8f4325d
permission: fix wildcard when children > 1
RafaelGSS Dec 21, 2023
8ff6bc4
lib,permission: handle buffer on fs.symlink
RafaelGSS Dec 21, 2023
a69c7d7
src,permission: add --allow-addon flag
RafaelGSS Dec 21, 2023
25eba3d
deps: V8: cherry-pick de611e69ad51
kvakil Dec 21, 2023
c7a1359
http: remove misleading warning
lpinca Dec 21, 2023
e24249c
fs: remove `internalModuleReadJSON` binding
anonrig Dec 21, 2023
c87e5d5
fs: add missing jsdoc parameters to `readSync`
anonrig Dec 21, 2023
9bfd84c
test: replace forEach with for of in test-trace-events-api.js
andp97 Nov 18, 2023
b621ada
module: move the CJS exports cache to internal/modules/cjs/loader
joyeecheung Dec 14, 2023
f1cb583
test: replace forEach() with for...of in test/parallel/test-util-log.js
edodusi Nov 18, 2023
38232d1
test: replace forEach with for of in file test-trace-events-net.js
Ianna83 Nov 18, 2023
3db376f
test: skip test-watch-mode-inspect on arm
mhdawson Dec 22, 2023
876743e
doc: run license-builder
github-actions[bot] Dec 22, 2023
88e8651
test: move to for of loop in test-http-hostname-typechecking.js
Puppo Dec 22, 2023
57c6455
test: replace forEach with for-of in test-webcrypto-export-import-ec
cricciardi Dec 22, 2023
3a49205
node-api: type tag external values without v8::Private
legendecas Dec 22, 2023
e5a8fa0
fs: make offset, position & length args in fh.read() optional
pulkit-30 Dec 22, 2023
96d64ed
src: use BignumPointer and use BN_clear_free
jasnell Oct 28, 2023
ed7305e
lib: reduce overhead of `SafePromiseAllSettledReturnVoid` calls
aduh95 Dec 22, 2023
6648a5c
meta: notify tsc on changes in SECURITY.md
RafaelGSS Dec 22, 2023
8f845eb
lib: move function declaration outside of loop
sanjaiyan-dev Dec 23, 2023
efa12a8
deps: update simdutf to 4.0.8
nodejs-github-bot Dec 23, 2023
c31ed51
timers: export timers.promises
marco-ippolito Dec 23, 2023
8ee882a
doc: mark `--jitless` as experimental
aduh95 Dec 23, 2023
6241429
lib: fix use of `--frozen-intrinsics` with `--jitless`
aduh95 Dec 23, 2023
17c73e6
src: fix unix abstract socket path for trace event
theanarkh Dec 23, 2023
941aedc
errors: fix stacktrace of SystemError
Uzlopak Sep 29, 2023
aaf710f
test: replace forEach test-http-server-multiheaders2
mmachera Nov 18, 2023
8412751
doc: improve localWindowSize event descriptions
DavyLandman Dec 6, 2023
47548d9
esm: fix hint on invalid module specifier
aduh95 Dec 23, 2023
979cebc
test_runner: fixed test object is incorrectly passed to setup()
pulkit-30 Dec 24, 2023
917d887
tools: update lint-md-dependencies to [email protected]
nodejs-github-bot Dec 24, 2023
cd61fce
build: add `-flax-vector-conversions` to V8 build
targos Dec 24, 2023
e443953
stream: fix cloned webstreams not being unref'd
jasnell Dec 24, 2023
df31c81
src: eliminate duplicate code in histogram.cc
jasnell Dec 25, 2023
684dd9d
test: fix inconsistency write size in `test-fs-readfile-tostring-fail`
Dec 25, 2023
f4f781d
util: pass invalidSubtypeIndex instead of trimmedSubtype to error
gaurishhs Dec 25, 2023
864ecb0
src: do not treat all paths ending with node_modules as such
targos Dec 25, 2023
54dd978
src: enter isolate before destructing IsolateData
bnoordhuis Dec 25, 2023
4dcc511
benchmark: remove dependency on unshipped tools
AdamMajer Dec 13, 2023
a41dca0
deps: update zlib to 1.3.0.1-motley-40e35a7
nodejs-github-bot Dec 26, 2023
82de660
stream: fix code style
MattiasBuelens Dec 26, 2023
5b32e21
quic: add quic internalBinding, refine Endpoint, add types
jasnell Dec 9, 2023
e03ac83
build: fix arm64 cross-compilation
targos Dec 27, 2023
f00f120
deps: update brotli to 1.1.0
nodejs-github-bot Dec 27, 2023
29b8157
src: refactor `GetCreationContext` calls
anonrig Dec 28, 2023
652af45
test: replace forEach() with for...of
JJJ54321 Nov 7, 2023
091098f
fs: fix fs.promises.realpath for long paths on Windows
sapphi-red Dec 28, 2023
4a5d3bd
doc: the GN files should use Node's license
zcbenz Dec 28, 2023
56e8969
watch: fix null `fileName` on windows systems
vnc5 Dec 28, 2023
c3126fc
tools: update inspector_protocol to ca525fc
cola119 Dec 27, 2023
ef4f46f
tools: update inspector_protocol to 547c5b8
cola119 Dec 27, 2023
d181684
tools: update inspector_protocol to 912eb68
cola119 Dec 27, 2023
60d8048
tools: update inspector_protocol to d7b099b
cola119 Dec 27, 2023
e325f49
tools: update inspector_protocol to 2f51e05
cola119 Dec 27, 2023
69a46ad
tools: update inspector_protocol to 9b4a4aa
cola119 Dec 27, 2023
bdcb5ed
tools: update inspector_protocol to c488ba2
cola119 Dec 27, 2023
d5a5f12
tools: fix dep_updaters dir updates
targos Dec 29, 2023
e53cbb2
deps: update ngtcp2 and nghttp3
jasnell Dec 26, 2023
7ecf994
quic: update quic impl to use latest ngtcp2/nghttp3
jasnell Dec 26, 2023
115e058
src: add fast api for Histogram
jasnell Dec 29, 2023
ef44f9b
test: replace foreach with for of
lucacapocci94-dev Dec 29, 2023
549e4b4
test: replace forEach with for...of
Nov 18, 2023
85ee2f7
test: replace forEach() with for...of
Nov 10, 2023
e7925e6
src,stream: improve WriteString
ywave620 Dec 30, 2023
416b4f8
lib,src,permission: port path.resolve to C++
RafaelGSS Dec 30, 2023
867b484
watch: clarify that the fileName parameter can be null
lpinca Dec 30, 2023
2eb41f8
build: fix for VScode "Reopen in Container"
ohhmm Dec 31, 2023
24a9a72
deps: update acorn to 8.11.3
nodejs-github-bot Jan 2, 2024
c0d2e8b
deps: update corepack to 0.24.0
nodejs-github-bot Jan 2, 2024
fc10f88
tools: update lint-md-dependencies to [email protected]
nodejs-github-bot Jan 2, 2024
a0ff00b
src: avoid draining platform tasks at FreeEnvironment
legendecas Jan 8, 2024
757a84c
test: fix flaky conditions for ppc64 SEA tests
richardlau Jan 11, 2024
f38a9a5
2024-01-15, Version 21.6.0 (Current)
RafaelGSS Jan 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src: implement FastByteLengthUtf8 with simdutf::utf8_length_from_latin1
PR-URL: #50840
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
  • Loading branch information
lemire authored and RafaelGSS committed Jan 2, 2024
commit 8a2dd93a144ccfa866abb8f435ee73eab11d7750
5 changes: 4 additions & 1 deletion benchmark/buffers/buffer-bytelength-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
const common = require('../common');

const bench = common.createBenchmark(main, {
type: ['one_byte', 'two_bytes', 'three_bytes', 'four_bytes'],
type: ['one_byte', 'two_bytes', 'three_bytes',
'four_bytes', 'latin1'],
encoding: ['utf8', 'base64'],
repeat: [1, 2, 16, 256], // x16
n: [4e6],
Expand All @@ -14,6 +15,8 @@ const chars = {
two_bytes: 'ΰαβγδεζηθικλμνξο',
three_bytes: '挰挱挲挳挴挵挶挷挸挹挺挻挼挽挾挿',
four_bytes: '𠜎𠜱𠝹𠱓𠱸𠲖𠳏𠳕𠴕𠵼𠵿𠸎𠸏𠹷𠺝𠺢',
latin1: 'Un homme sage est supérieur à toutes ' +
'les insultes qui peuvent lui être adressées, et la meilleure réponse est la patience et la modération.',
};

function getInput(type, repeat, encoding) {
Expand Down
8 changes: 6 additions & 2 deletions src/node_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -743,13 +743,17 @@ void SlowByteLengthUtf8(const FunctionCallbackInfo<Value>& args) {

uint32_t FastByteLengthUtf8(Local<Value> receiver,
const v8::FastOneByteString& source) {
uint32_t result = 0;
// For short inputs, the function call overhead to simdutf is maybe
// not worth it, reserve simdutf for long strings.
if (source.length > 128) {
return simdutf::utf8_length_from_latin1(source.data, source.length);
}
uint32_t length = source.length;
uint32_t result = length;
const uint8_t* data = reinterpret_cast<const uint8_t*>(source.data);
for (uint32_t i = 0; i < length; ++i) {
result += (data[i] >> 7);
}
result += length;
return result;
}

Expand Down