Fix performance bug: Bad value context for argument value#332
Open
NightRa wants to merge 1 commit intozaach:masterfrom
Open
Fix performance bug: Bad value context for argument value#332NightRa wants to merge 1 commit intozaach:masterfrom
NightRa wants to merge 1 commit intozaach:masterfrom
Conversation
5095215 to
1cb19b4
Compare
Contributor
|
@NightRa : nice catch, this one! Since you seem interested in maximum performance jison parsers, you may be interested in GerHobbelt@d2f8af7 The thought there is that
==> that made me wonder: "Why don't we take the %parse-params argument list and inject straight away into the code instead of messing with this Thanks you for your work; I had not realized the high cost of |
GerHobbelt
added a commit
to GerHobbelt/jison
that referenced
this pull request
Nov 11, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using
argumentsin a dynamic way in a function leads to the JIT (v8) not optimizing the whole function, with the error: "Bad value context for argument value". See GoogleChrome/devtools-docs#53 (comment) and Note gist.This commit wraps the parse function with handling of
arguments, and calls into the regular function with theargsarray, and now it can be optimized.This fix improved performance almost 2x for me, from 17s to 9s. (for 500Kb of text so there's still room for improvement)