Skip to content

benchmark swap var for let refactor in for loops - #28958

Closed
RamirezAlex wants to merge 6 commits into
nodejs:masterfrom
RamirezAlex:benchmark-refactor
Closed

benchmark swap var for let refactor in for loops#28958
RamirezAlex wants to merge 6 commits into
nodejs:masterfrom
RamirezAlex:benchmark-refactor

Conversation

@RamirezAlex

@RamirezAlexRamirezAlex commented Aug 4, 2019

Copy link
Copy Markdown
Contributor

In benchmark directories this changes for loops using var to let
when it applies for consistency. So it finishes what started on #28867

The list of files below remain using var in the nested for loops, rest which is the majority use let now for consistency.

$ grep -l 'for (var' benchmark/*/*.js
benchmark/buffers/buffer-fill.js
benchmark/buffers/buffer-iterate.js
benchmark/buffers/buffer-swap.js
benchmark/cluster/echo.js
benchmark/es/foreach-bench.js
benchmark/events/ee-add-remove.js
benchmark/fs/read-stream-throughput.js
benchmark/misc/freelist.js
benchmark/module/module-loader.js
benchmark/streams/readable-bigread.js
benchmark/streams/readable-bigunevenread.js
benchmark/streams/readable-boundaryread.js
benchmark/streams/readable-readall.js
benchmark/streams/readable-unevenread.js
benchmark/string_decoder/string-decoder.js
benchmark/util/normalize-encoding.js
benchmark/worker/echo.js
  • make -j4 test (UNIX)
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added assert Issues and PRs related to the assert subsystem. benchmark Issues and PRs related to the benchmark subsystem. cluster Issues and PRs related to the cluster subsystem. crypto Issues and PRs related to the crypto subsystem. dgram Issues and PRs related to the dgram subsystem / UDP. domain Issues and PRs related to the domain subsystem. events Issues and PRs related to the events subsystem / EventEmitter. fs Issues and PRs related to the fs subsystem / file system. v8 engine Issues and PRs related to the V8 dependency. labels Aug 4, 2019
@RamirezAlexRamirezAlex changed the title Benchmark swap var for let refactor in for loopsbenchmark swap var for let refactor in for loopsAug 4, 2019
@Trott

Trott commented Aug 7, 2019

Copy link
Copy Markdown
Member

@Trott

Trott commented Aug 7, 2019

Copy link
Copy Markdown
Member

Benchmark CI: https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/8415/ (queued, will 404 until a worker becomes available)

@Trott

Copy link
Copy Markdown
Member

@mscdex Are you 👍, 👎 , or ❓ on these changes in the benchmark files?

@RamirezAlex

Copy link
Copy Markdown
ContributorAuthor

Hi @Trott, I have resolved some conflicts that we recently had in this PR after more benchmarks code were introduced.
Did the Benchkmark CI queue you run lasts time went OK? Should we run those benckmarks again?
Thank you.

@BridgeAR

Copy link
Copy Markdown
Member

This needs a rebase. @RamirezAlex sorry that it took so long for someone to look at this again! Some times it's difficult to keep an overview over everything.

@richardlaurichardlau mentioned this pull request Feb 2, 2020
2 tasks
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Trott

Trott commented Feb 3, 2020

Copy link
Copy Markdown
Member

In benchmark timers directory this changes for loops using var to let
when it applies for consistency
In benchmark path directory this changes for loops
using var to let when it applies for consistency
In benchmark os directory this changes for loops
using var to let when it applies for consistency
In benchmark querystring directory this changes for loops
using var to let when it applies for consistency
In benchmark vm directory this changes for loops
using var to let when it applies for consistency
In benchmark directory this changes for loops
using var to let when it applies for consistency
@Trott

Trott commented Feb 3, 2020

Copy link
Copy Markdown
Member

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

addaleax pushed a commit that referenced this pull request Feb 13, 2020
In benchmark directory this changes for loops
using var to let when it applies for consistency
PR-URL: #28958
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@addaleax

Copy link
Copy Markdown
Member

Landed in d0ed431 🎉

codebytere pushed a commit that referenced this pull request Feb 17, 2020
In benchmark directory this changes for loops
using var to let when it applies for consistency
PR-URL: #28958
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@codebyterecodebytere mentioned this pull request Feb 17, 2020
codebytere pushed a commit that referenced this pull request Mar 15, 2020
In benchmark directory this changes for loops
using var to let when it applies for consistency
PR-URL: #28958
Reviewed-By: Anna Henningsen <anna@addaleax.net>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
In benchmark directory this changes for loops
using var to let when it applies for consistency
PR-URL: #28958
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@codebyterecodebytere mentioned this pull request Mar 17, 2020
codebytere pushed a commit that referenced this pull request Mar 30, 2020
In benchmark directory this changes for loops
using var to let when it applies for consistency
PR-URL: #28958
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assertIssues and PRs related to the assert subsystem.benchmarkIssues and PRs related to the benchmark subsystem.clusterIssues and PRs related to the cluster subsystem.cryptoIssues and PRs related to the crypto subsystem.dgramIssues and PRs related to the dgram subsystem / UDP.domainIssues and PRs related to the domain subsystem.eventsIssues and PRs related to the events subsystem / EventEmitter.fsIssues and PRs related to the fs subsystem / file system.v8 engineIssues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@RamirezAlex@Trott@BridgeAR@nodejs-github-bot@addaleax