-
-
For Gecko the answer starts with "it depends on JIT level and type inference results" and goes on from there.
1 reply 0 retweets 1 like -
Also depends on whether the property getter is marked side-effect-free and whether there are CSE/LICM opportunities.
1 reply 0 retweets 0 likes -
And whether the property is annotated as "cached" in which case the JIT can read the cache directly without doing a vmcall.
2 replies 0 retweets 0 likes -
Given opportunity to store truth in user JS and read from that instead of DOM, would you? Eg, option.selected.
1 reply 0 retweets 0 likes -
option.selected is a bad example because it depends very non-locally on other options, no?
2 replies 0 retweets 0 likes -
But in general, I would probably not jump through hoops unless I had profiles telling me I should...
1 reply 0 retweets 1 like -
What about setter? Trying to decide which hoops we should stop jumping through based on perhaps wrong assumptions.
1 reply 0 retweets 0 likes -
https://github.com/facebook/react/pull/7141/files … is 1 such small hoop - we avoid setter if we can assuming it's expensive.
1 reply 0 retweets 0 likes -
It's hard to say. The setter logic there is complicated, but the "same value" case might end up fairly cheap...
1 reply 0 retweets 1 like
The usual answer is "need to measure". In multiple browsers. :(
-
-
thanks so much for taking the time! This def helps frame some decisions, will do some testing. Most concerned about old IE
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.