Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

perf($parse): improve performance of assignment expressions #14957

Closed
wants to merge 3 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Jul 27, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Minor perf improvement.

Does this PR introduce a breaking change?
No.

Please check if the PR fulfills these requirements

Other information:
There was a ~5% improvement in the parsed-expressions-bp/assignment benchmark (which only contains assignment expressions). In real-world applications, the time spent in assignment expressions will be a tiny fragment of the overall processing time (so this change is hardly expected to make any noticeable difference).

Related to #14951.

gkalpak added 3 commits July 27, 2016 19:34
There was a ~5% improvement in the `parsed-expressions-bp/assignment` benchmark (which only contains
assignment expressions). In real-world applications, the time spent in assignment expressions will
be a tiny fragment of the overall processing time.
@gkalpak
Copy link
Member Author

gkalpak commented Jul 27, 2016

Btw, this essentially voids the prototype check if any of the banned prototypes changes dynamically (i.e. after we have cached it). Considering these checks are not security-related and that dynamically changing prototypes of core constructors is likely to break other things as well, I don't think it should be a concern.

/fyi @petebacondarwin

@petebacondarwin
Copy link
Contributor

I note that we were already caching Function.prototype.call, Function.prototype.apply and Function.prototype.bind. So I am confident that this is OK. LGTM.
Can we get another LGTM from someone, perhaps @IgorMinar or @lgalfaso?

@lgalfaso
Copy link
Contributor

LGTM

@gkalpak gkalpak closed this in e8d7496 Aug 8, 2016
gkalpak added a commit that referenced this pull request Aug 8, 2016
There was a ~5% improvement in the added `parsed-expressions-bp/assignment` benchmark (which only
contains assignment expressions). In real-world applications, the time spent in assignment
expressions will be a tiny fragment of the overall processing time, though.

Closes #14957
@gkalpak gkalpak deleted the perf-parse-cache-constructors branch August 8, 2016 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants