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 — worker: refactor to avoid unsafe array iteration by aduh95 · Pull Request #36735 · nodejs/node

Conversation

@aduh95

@aduh95 aduh95 commented Jan 2, 2021

Copy link
Copy Markdown
Contributor
Checklist
  • 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.

All reactions
@aduh95 aduh95 added worker Issues and PRs related to the worker_threads module and Worker API. needs-benchmark-ci PRs that need a benchmark CI run. labels Jan 2, 2021
@aduh95

aduh95 commented Jan 2, 2021

Copy link
Copy Markdown
Contributor Author

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/854/ (queued, will 404 until it starts)

All reactions

Sorry, something went wrong.

Uh oh!

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

RaisinTen
RaisinTen reviewed Jan 2, 2021
View reviewed changes
Comment thread lib/internal/worker.js Resolved

Uh oh!

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

aduh95
aduh95 commented Jan 2, 2021
View reviewed changes
Comment thread lib/internal/worker.js Resolved

Uh oh!

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

@aduh95

aduh95 commented Jan 2, 2021

Copy link
Copy Markdown
Contributor Author

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/854/ (queued, will 404 until it starts)

No perf improvements or regressions.

Details
                                                                         confidence improvement accuracy (*)   (**)  (***)
 worker/atomics-wait.js n=10000000                                                       1.04 %       ±2.91% ±3.87% ±5.04%
 worker/bench-eventlooputil.js method='ELU_passed' n=1000000                             0.22 %       ±2.25% ±2.99% ±3.89%
 worker/bench-eventlooputil.js method='ELU_simple' n=1000000                            -0.90 %       ±2.30% ±3.06% ±3.98%
 worker/echo.js n=100000 sendsPerBroadcast=10 payload='object' workers=1                 2.86 %       ±5.65% ±7.52% ±9.78%
 worker/echo.js n=100000 sendsPerBroadcast=10 payload='string' workers=1                -0.66 %       ±4.81% ±6.40% ±8.34%
 worker/echo.js n=100000 sendsPerBroadcast=1 payload='object' workers=1                 -2.49 %       ±3.08% ±4.12% ±5.38%
 worker/echo.js n=100000 sendsPerBroadcast=1 payload='string' workers=1                  0.16 %       ±3.32% ±4.42% ±5.76%
 worker/messageport.js n=1000000 style='eventemitter' payload='object'                   2.89 %       ±3.42% ±4.57% ±5.98%
 worker/messageport.js n=1000000 style='eventemitter' payload='string'                   0.74 %       ±3.30% ±4.42% ±5.83%
 worker/messageport.js n=1000000 style='eventtarget' payload='object'                    2.41 %       ±2.81% ±3.75% ±4.89%
 worker/messageport.js n=1000000 style='eventtarget' payload='string'                    2.82 %       ±4.47% ±5.99% ±7.89%

Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case there are 11 comparisons, you can thus
expect the following amount of false-positive results:
  0.55 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.11 false positives, when considering a   1% risk acceptance (**, ***),
  0.01 false positives, when considering a 0.1% risk acceptance (***)
All reactions

Sorry, something went wrong.

Uh oh!

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

@aduh95 aduh95 removed the needs-benchmark-ci PRs that need a benchmark CI run. label Jan 2, 2021
aduh95
aduh95 commented Jan 3, 2021
View reviewed changes
Comment thread lib/internal/worker/io.js Resolved

Uh oh!

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

Comment thread lib/internal/worker/io.js Resolved

Uh oh!

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

@targos

targos commented Jan 3, 2021

Copy link
Copy Markdown
Member

typo: woker -> worker

aduh95 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@aduh95 aduh95 changed the title woker: refactor to avoid unsafe array iteration worker: refactor to avoid unsafe array iteration Jan 3, 2021
@aduh95

aduh95 commented Jan 3, 2021

Copy link
Copy Markdown
Contributor Author

typo: woker -> worker

Good catch! I'll fix that on/if landing if that's OK.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ronag
ronag requested a review from addaleax January 3, 2021 11:42
@aduh95 aduh95 added the review wanted PRs that need review. label Jan 9, 2021
Trott
Trott approved these changes Jan 12, 2021
View reviewed changes
@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Jan 12, 2021
@aduh95 aduh95 self-assigned this Jan 12, 2021
jasnell
jasnell approved these changes Jan 12, 2021
View reviewed changes
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 13, 2021
@nodejs-github-bot

nodejs-github-bot commented Jan 13, 2021

Copy link
Copy Markdown
Collaborator

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

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 Jan 13, 2021

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@aduh95
worker: refactor to avoid unsafe array iteration
7c37e04
PR-URL: nodejs#36735
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@aduh95
aduh95 force-pushed the worker-array-iteration branch from 7f9a136 to 7c37e04 Compare January 13, 2021 14:43
@aduh95

aduh95 commented Jan 13, 2021

Copy link
Copy Markdown
Contributor Author

Landed in 7c37e04

All reactions

Sorry, something went wrong.

Uh oh!

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

@aduh95
aduh95 merged commit 7c37e04 into nodejs:master Jan 13, 2021
@aduh95
aduh95 deleted the worker-array-iteration branch January 13, 2021 14:44
@ruyadorno ruyadorno removed the review wanted PRs that need review. label Jan 21, 2021
ruyadorno pushed a commit that referenced this pull request Jan 22, 2021
@aduh95 @ruyadorno
worker: refactor to avoid unsafe array iteration
bf695eb
PR-URL: #36735
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@ruyadorno ruyadorno mentioned this pull request Jan 22, 2021
v15.7.0 proposal #37020
Merged
@targos targos added the backport-blocked-v14.x label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@RaisinTen RaisinTen RaisinTen left review comments
@jasnell jasnell jasnell approved these changes
@Trott Trott Trott approved these changes
@addaleax addaleax Awaiting requested review from addaleax

Uh oh!

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

Assignees

@aduh95 aduh95

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. worker Issues and PRs related to the worker_threads module and Worker API.

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.

7 participants

@aduh95 @targos @nodejs-github-bot @jasnell @Trott @RaisinTen @ruyadorno
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 01402503 — 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.