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

Commit 4676184

Browse files
ckerrRafaelGSS
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 0906004 commit 4676184

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)