src: use NewFromUtf8Literal in NODE_DEFINE_CONSTANT · nodejs/node@8d5b8c3 · GitHub
Skip to content

Commit 8d5b8c3

Browse files
ckerrmarco-ippolito
authored andcommitted
src: use NewFromUtf8Literal in NODE_DEFINE_CONSTANT
Small efficiency improvement over NewFromUtf8(): the literal's length is known at compile time, so V8 doesn't have to call strlen() or ToLocalChecked(). PR-URL: #55581 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 22e0d17 commit 8d5b8c3

1 file changed

Lines changed: 32 additions & 38 deletions

File tree

src/node.h

Lines changed: 32 additions & 38 deletions

0 commit comments

Comments
 (0)