Skip to content
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

parser: improve overall parser performance #21

Closed
wants to merge 1 commit into from

Conversation

belochub
Copy link
Member

@belochub belochub commented Aug 22, 2018

  • Slightly improve string parsing performance.
  • Highly improve parsing performance for Buffers by
    avoiding toString conversion (leading to copying data).

Refs: metarhia/jstp#254

@belochub belochub self-assigned this Aug 22, 2018
@belochub belochub requested a review from aqrln August 22, 2018 15:24
std::size_t length;

if (args[0]->IsString()) {
String::Utf8Value utf8str(args[0]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think str is also fine here.

@belochub belochub force-pushed the parser-optimization branch 2 times, most recently from aa5258d to fd12219 Compare August 27, 2018 14:05
* Slightly improve string parsing performance.
* Highly improve parsing performance for Buffers by
  avoiding toString conversion (leading to copying data).

Refs: metarhia/jstp#254
@belochub belochub force-pushed the parser-optimization branch from fd12219 to 1ffcf07 Compare August 27, 2018 14:23
belochub added a commit that referenced this pull request Aug 28, 2018
* Slightly improve string parsing performance.
* Highly improve parsing performance for Buffers by
  avoiding toString conversion (leading to copying data).

Refs: metarhia/jstp#254
PR-URL: #21
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
@belochub
Copy link
Member Author

Landed in 450c67a.

@belochub belochub closed this Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants