You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If it were in the Rust language, there is a type called string slice (&str) which can avoid copying each substring into other memory space. After splitting, it can just returns an array of string slices ([&str]), that should be pretty fast.
However, in Node.js, the use of napi_create_string_* functions causes cloning. I don't see any other functions in N-API that can create JS strings. Maybe it is not possible to prevent it.
Splitting strings by a delimiter to an array is an expensive operation.
Any idea when we can expect this from stringbuilder?
The text was updated successfully, but these errors were encountered: