Skip to content
Snippets Groups Projects
Unverified Commit 5d0d15a0 authored by Charles Kerr's avatar Charles Kerr Committed by GitHub
Browse files

perf: prefer NewFromUtf8Literal() over NewFromUtf8() for string literals (#44412)

* perf: prefer NewFromUtf8Literal() over NewFromUtf8() for string literals

the string length is known at compile time and no need to call ToLocalChecked()

* perf: string length is known when calling NewFromUtf8(), so use it

* perf: remove unnecessary calls to c_str()

these just force the code being called to have to recalculate the string length
parent 348801b2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment