-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
perf: Context independent, shared null && undefined #3847
Comments
I like the idea of sharing more static data between contexts, but I'm concerned that there may be a number of places where the ScriptContext is considered and will lead to us going down slow paths, and that you may run into a bunch of asserts. |
@MikeHolman could you provide more context on this? |
The example I'm thinking of is that for property caches, if an object's scriptContext isn't the current context we won't cache it. I think there are a number of places where we will do these type of comparisons. |
I see. How your scenario could prevent us from having a single |
I'm having a hard time coming up with anything that will concretely be a problem, so maybe there isn't anything. I just have a feeling that there will be a number of subtle issues. |
Currently
null
andundefined
are created perJavascriptLibrary
.JsVar
tonull
orundefined
because we don't know its' origin.JsVar
-> ToRecyc..Object -> Compare... is unnecessarily more complicatedJsVar
is actually aRecyc..Object
hence things are easier (this improvement is already merged to master). Yet, those places are very limitedAny objections to making
null
,undefined
values are allocated per framework only once?Is there anything else that we could use the same approach?
The text was updated successfully, but these errors were encountered: