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

perf(ext/url): cleanup and optimize url parsing op args #11763

Merged
merged 1 commit into from Aug 18, 2021

Conversation

AaronO
Copy link
Contributor

@AaronO AaronO commented Aug 18, 2021

This splits the previous op_url_parse into:

  • op_url_parse: parses a href with an optional base
  • op_url_reparse: reparses a href with a modifier

This is a cleaner separation of concerns and it allows us to optimize & simplify args passed. Resulting in a 25% reduction in call overhead (~5000ns/call => ~3700ns/call in the url_ops bench on my M1 Air)

This splits the previous `op_url_parse` into:
- `op_url_parse`: parses a href with an optional base
- `op_url_reparse`: reparses a href with a modifier

This is a cleaner separation of concerns and it allows us to optimize & simplify args passed. Resulting in a 25% reduction in call overhead (~5000ns/call => ~3700ns/call in url_ops bench on my M1 Air)
Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

Impressive improvement!

@AaronO AaronO merged commit bf0bacb into denoland:main Aug 18, 2021
@AaronO AaronO deleted the perf/url-parsing-op-args branch August 18, 2021 21:21
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.

None yet

2 participants