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 — http2: refactor counter in `mapToHeaders` inner loop by mkrawczuk · Pull Request #32012 · nodejs/node

Conversation

@mkrawczuk

@mkrawczuk mkrawczuk commented Feb 28, 2020 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

This cosmetic change is to prevent potential bugs - e.g., someone might
automatically use the variable k, instead of key, that is used in
vicinity of this loop. Got rid of old-style var declaration. It does
make sense to sometimes use var in for loops for optimization, but
not in this context. Also changed post-increment to pre-increment in
iteration steps. It is probably done by the optimizer anyway,
otherwise it will save an opcode each iteration. And it is a good
practice.

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

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

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@mkrawczuk
http2: rename counter in mapToHeaders inner loop
d4c3481
This change is to prevent potential bugs - e.g., someone might
automatically use the variable `k` instead of `key`, that is used in
vicinity of this loop.
Also changed postincrement to preincrement in iteration steps. It is
probably done by the optimizer anyway, but otherwise it will save an
opcode each iteration. And it is a good practice.
@nodejs-github-bot nodejs-github-bot added the http2 Issues and PRs related to the http2 subsystem. label Feb 28, 2020
jasnell
jasnell approved these changes Mar 2, 2020
View reviewed changes
BridgeAR
BridgeAR approved these changes Mar 9, 2020
View reviewed changes
@BridgeAR BridgeAR added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Mar 9, 2020
@nodejs-github-bot

nodejs-github-bot commented Mar 9, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/29675/

All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot

nodejs-github-bot commented Mar 11, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/29746/

All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot

nodejs-github-bot commented Mar 12, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/29780/

All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot

nodejs-github-bot commented Mar 13, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/29807/

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax

addaleax commented Mar 13, 2020 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Landed in 4ffb39b 🎉

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax addaleax closed this Mar 13, 2020
addaleax pushed a commit that referenced this pull request Mar 13, 2020
@mkrawczuk @addaleax
http2: rename counter in mapToHeaders inner loop
4ffb39b
This change is to prevent potential bugs - e.g., someone might
automatically use the variable `k` instead of `key`, that is used in
vicinity of this loop.
Also changed postincrement to preincrement in iteration steps. It is
probably done by the optimizer anyway, but otherwise it will save an
opcode each iteration. And it is a good practice.

PR-URL: #32012
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
BridgeAR pushed a commit that referenced this pull request Mar 17, 2020
@mkrawczuk @BridgeAR
http2: rename counter in mapToHeaders inner loop
32dbc7a
This change is to prevent potential bugs - e.g., someone might
automatically use the variable `k` instead of `key`, that is used in
vicinity of this loop.
Also changed postincrement to preincrement in iteration steps. It is
probably done by the optimizer anyway, but otherwise it will save an
opcode each iteration. And it is a good practice.

PR-URL: #32012
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 19, 2020
v13.12.0 proposal #32376
Merged
MylesBorins pushed a commit that referenced this pull request Mar 24, 2020
@mkrawczuk @MylesBorins
http2: rename counter in mapToHeaders inner loop
d2fea9f
This change is to prevent potential bugs - e.g., someone might
automatically use the variable `k` instead of `key`, that is used in
vicinity of this loop.
Also changed postincrement to preincrement in iteration steps. It is
probably done by the optimizer anyway, but otherwise it will save an
opcode each iteration. And it is a good practice.

PR-URL: #32012
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
targos pushed a commit that referenced this pull request Apr 22, 2020
@mkrawczuk @targos
http2: rename counter in mapToHeaders inner loop
e54eb46
This change is to prevent potential bugs - e.g., someone might
automatically use the variable `k` instead of `key`, that is used in
vicinity of this loop.
Also changed postincrement to preincrement in iteration steps. It is
probably done by the optimizer anyway, but otherwise it will save an
opcode each iteration. And it is a good practice.

PR-URL: #32012
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@targos targos mentioned this pull request Apr 22, 2020
v12.16.3 release proposal #33009
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. http2 Issues and PRs related to the http2 subsystem.

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.

5 participants

@mkrawczuk @nodejs-github-bot @addaleax @jasnell @BridgeAR
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 01402520 — 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.