-
-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some string optimizations #4030
Conversation
dd9757e
to
a84e045
Compare
1260446
to
5c29f69
Compare
3a12748
to
8e5a080
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two non-blocking nits, but otherwise everything is pretty straightforward.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
js_str!
withjs_string!
where argument is to be converted toJsString
to reduce heap allocation #4024get_number_option
: property: JsStr<'_> -> JsStringget_option
: property: JsStr<'_> -> JsStringget_temporal_unit
: key: JsStr<'_> -> JsStringget_typed_fn
: name: JsStr<'_> -> JsStringboolean
'sto_string
to_string
inNumber::to_js_string
LazyLock
onRAW_STATICS_CACHE
since it is immutable