GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: pre-optimize url.parse() before start by bnoordhuis · Pull Request #132 · nodejs/node

Conversation

@bnoordhuis

@bnoordhuis bnoordhuis commented Dec 9, 2014

Copy link
Copy Markdown
Member

Force V8 to optimize url.parse() before starting the actual benchmark.
Tries to minimize variance between successive runs caused by the
optimizer kicking in at different points.

It does not seem to have much impact, CPU times are roughly the same
before and afterwards; url.parse() quickly plateaus at a local optimum
where most time is spent in V8 builtins, notably Runtime_StringSplit()
and Object::GetElementWithReceiver() calls originating from
deps/v8/src/uri.js, with no recurring optimize/deoptimize cycles that
I could spot.

Still, I don't see any downsides to pre-optimizing the function being
benchmarked so in it goes.

R=@chrisdickinson. Please ignore the first commit, that's #131 (which is a prerequisite of this PR, however.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@piscisaureus piscisaureus added the unknown label Dec 9, 2014
@indutny

indutny commented Dec 10, 2014

Copy link
Copy Markdown
Member

Huh, sorry hit cmd+enter earlier than I thought. I thought there was a downside in not feeding enough type info, but I see now that you already incorporated this into this PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny

indutny commented Dec 10, 2014

Copy link
Copy Markdown
Member

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@piscisaureus piscisaureus removed the unknown label Dec 16, 2014
@bnoordhuis
benchmark: pre-optimize url.parse() before start
1a63b45
Force V8 to optimize url.parse() before starting the actual benchmark.
Tries to minimize variance between successive runs caused by the
optimizer kicking in at different points.

It does not seem to have much impact, CPU times are roughly the same
before and afterwards; url.parse() quickly plateaus at a local optimum
where most time is spent in V8 builtins, notably Runtime_StringSplit()
and Object::GetElementWithReceiver() calls originating from
deps/v8/src/uri.js, with no recurring optimize/deoptimize cycles that
I could spot.

Still, I don't see any downsides to pre-optimizing the function being
benchmarked so in it goes.

PR-URL: nodejs#132
Reviewed-By: Chris Dickinson <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
@bnoordhuis
bnoordhuis force-pushed the optimize-on-next-function-call branch from d5cc52e to 1a63b45 Compare December 19, 2014 22:16
@bnoordhuis
bnoordhuis merged commit 1a63b45 into nodejs:v0.12 Dec 19, 2014
@bnoordhuis
bnoordhuis deleted the optimize-on-next-function-call branch December 19, 2014 22:16
kunalspathak referenced this pull request in nodejs/node-chakracore Dec 7, 2015
@kunalspathak
Added back jslint prefer-const rule
82ad0b3
Issue #132 is fixed in chakracore so adding back the jslint rule of prefer-const.
@rsmodake rsmodake mentioned this pull request Jan 12, 2018
events.js:163 throw er; // Unhandled 'error' event... Node Version v7.10.0 #18124
Closed
This was referenced Jan 31, 2020
[Snyk] Fix for 1 vulnerabilities Bhanditz/node#2
Open
[Snyk] Fix for 1 vulnerabilities vaibhavb/node#2
Open
[Snyk] Fix for 1 vulnerabilities timzwit/node#3
Open
[Snyk] Fix for 1 vulnerabilities meghasfdc/node#2
Open
[Snyk] Fix for 1 vulnerabilities erdun/node#17
Open
[Snyk] Fix for 1 vulnerabilities RoeeOren/node#5
Open
[Snyk] Fix for 1 vulnerabilities pmq20/node#17
Open
[Snyk] Fix for 1 vulnerabilities jhudaz/node#1
Open
[Snyk] Fix for 1 vulnerabilities kissofire/node#2
Open
[Snyk] Fix for 1 vulnerabilities ajesse11x/node#11
Open
[Snyk] Fix for 1 vulnerabilities apoorvanand/node-2#2
Open
[Snyk] Fix for 1 vulnerabilities saeedahassan/node#14
Open
[Snyk] Fix for 1 vulnerabilities dan-mckean/node#2
Open
[Snyk] Fix for 1 vulnerabilities santhoshkumarvs/node#2
Open
[Snyk] Fix for 1 vulnerabilities GregorFendt/node#3
Open
[Snyk] Fix for 1 vulnerabilities timscharfenort/node#6
Open
[Snyk] Fix for 1 vulnerabilities mkg20001/node#17
Open
[Snyk] Fix for 1 vulnerabilities bumplzz69/node#2
Open
[Snyk] Fix for 1 vulnerabilities adamlaska/node#10
Open
[Snyk] Fix for 1 vulnerabilities awaisab172/node#2
Open
This was referenced Sep 27, 2021
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 sirinartk/node#25
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 ron-a20/node#50
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 ajesse11x/node#32
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 ShubhraKar/node#24
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 adamlaska/node#58
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 137717unity/node#42
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 chrismilleruk/node#13
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 RoeeOren/node#24
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 Qdigital/node#21
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 kissofire/node#51
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 awaisab172/node#26
Open
[Snyk] Security upgrade update-notifier from 2.2.0 to 3.0.0 erdun/node#43
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 vaibhavb/node#23
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 jhudaz/node#30
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 wedataintelligence/node#18
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 Rednickle/node-1#37
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 aliceUnhinged613/node#40
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 timzwit/node#21
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 GregorFendt/node#19
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 apoorvanand/node-2#24
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 luke7oaks/node-1#27
Open
[Snyk] Security upgrade update-notifier from 2.2.0 to 3.0.0 olegnn/node#37
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 sitedata/node#41
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 baophucct/node#26
Open
[Snyk] Security upgrade update-notifier from 2.5.0 to 3.0.0 AyushG3112/node#26
Open
[Snyk] Security upgrade update-notifier from 2.2.0 to 3.0.0 saeedahassan/node#37
Open
@AyushG3112 AyushG3112 mentioned this pull request Jun 22, 2022
[Snyk] Fix for 1 vulnerabilities AyushG3112/node#28
Open
@aborovsky aborovsky mentioned this pull request Aug 24, 2023
[Snyk] Upgrade doctrine from 0.6.4 to 0.7.2 aborovsky/node#6
Closed
@dannybrown13 dannybrown13 mentioned this pull request Apr 30, 2024
[Snyk] Upgrade jsdoc-type-pratt-parser from 2.0.2 to 2.2.5 dannybrown13/node#88
Open
@AshdonG AshdonG mentioned this pull request May 7, 2024
[Snyk] Upgrade @humanwhocodes/config-array from 0.9.5 to 0.12.3 AshdonG/node#74
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@bnoordhuis @indutny @piscisaureus
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.