Drop Usage of Object::Set() by trevnorris · Pull Request #3780 · nodejs/node

@r-52 r-52 added the c++

Issues and PRs that require attention from people who are familiar with C++.

label

Nov 11, 2015

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request

Jan 6, 2016
The initial implementation of setPropByIndex() set the value of an Array
by index during development. Though the final form of the function
simply pushes passed values to an array as passed by arguments. Thus the
functions have been renamed to pushValueToArray() and
push_values_to_array_function() respectively.

Also add define for maximum number of arguments should be used before
hitting the limit of performance increase.

Fixes: 494227b "node: improve GetActiveRequests performance"
PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request

Jan 6, 2016
For performance add headers to the headers Array by pushing them on from
JS. Benchmark added to demonstrate this case.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request

Jan 6, 2016
Improve performance by pushing directory entries to returned array in
batches of 8 using pushValueToArray() in JS. Add benchmarks to
demonstrate this improvement.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request

Jan 6, 2016
Improve performance of process._getActiveHandles by sending handles in
batches to JS to be set on the passed Array. Add test to check proper
active handles are returned.

Alter implementation of GetActiveRequests to match GetActiveHandles'
implementation.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request

Jan 6, 2016
process.hrtime() was performing too many operations in C++ that could be
done faster in JS. Move those operations over by creating a length 4
Uint32Array and perform bitwise operations on the seconds so that it was
unnecessary for the native API to do any object creation or set any
fields.

This has improved performance from ~350 ns/op to ~65 ns/op. Light
benchmark included to demonstrate the performance change.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request

Jan 6, 2016
Set process.env array entries in JS.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

Fishrock123 added a commit to Fishrock123/node that referenced this pull request

Jan 6, 2016
* http:
  - A new status code was added: 451 - "Unavailable For Legal Reasons" (Max Barinov) nodejs#4377
  - Idle sockets that have been kept alive now handle errors (José F. Romaniello) nodejs#4482
* This release also includes several minor performance improvements:
  - assert: deepEqual is now speedier when comparing TypedArrays (Claudio Rodriguez) nodejs#4330
  - lib: Use arrow functions instead of bind where possible (Minwoo Jung) nodejs#3622
  - node: Improved accessor perf of process.env (Trevor Norris) nodejs#3780
  - node: Improved performance of process.hrtime() (Trevor Norris) nodejs#3780, (Evan Lucas) nodejs#4484
  - node: Improved GetActiveHandles performance (Trevor Norris) nodejs#3780
  - util: Use faster iteration in util.format() (Jackson Tian) nodejs#3964

PR-URL: nodejs#4547

Fishrock123 added a commit to Fishrock123/node that referenced this pull request

Jan 11, 2016
* http:
  - A new status code was added: 451 - "Unavailable For Legal Reasons"
(Max Barinov) nodejs#4377
  - Idle sockets that have been kept alive now handle errors (José F.
Romaniello) nodejs#4482
* This release also includes several minor performance improvements:
  - assert: deepEqual is now speedier when comparing TypedArrays
(Claudio Rodriguez) nodejs#4330
  - lib: Use arrow functions instead of bind where possible (Minwoo
Jung) nodejs#3622
  - node: Improved accessor perf of process.env (Trevor Norris)
nodejs#3780
  - node: Improved performance of process.hrtime() (Trevor Norris)
nodejs#3780, (Evan Lucas)
nodejs#4484
  - node: Improved GetActiveHandles performance (Trevor Norris)
nodejs#3780
  - util: Use faster iteration in util.format() (Jackson Tian)
nodejs#3964

Refs: nodejs#4547
PR-URL: nodejs#4623
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

@mhart mhart mentioned this pull request

Jan 19, 2016

scovetta pushed a commit to scovetta/node that referenced this pull request

Apr 2, 2016
The initial implementation of setPropByIndex() set the value of an Array
by index during development. Though the final form of the function
simply pushes passed values to an array as passed by arguments. Thus the
functions have been renamed to pushValueToArray() and
push_values_to_array_function() respectively.

Also add define for maximum number of arguments should be used before
hitting the limit of performance increase.

Fixes: 494227b "node: improve GetActiveRequests performance"
PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

scovetta pushed a commit to scovetta/node that referenced this pull request

Apr 2, 2016
For performance add headers to the headers Array by pushing them on from
JS. Benchmark added to demonstrate this case.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

scovetta pushed a commit to scovetta/node that referenced this pull request

Apr 2, 2016
Improve performance by pushing directory entries to returned array in
batches of 8 using pushValueToArray() in JS. Add benchmarks to
demonstrate this improvement.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

scovetta pushed a commit to scovetta/node that referenced this pull request

Apr 2, 2016
Improve performance of process._getActiveHandles by sending handles in
batches to JS to be set on the passed Array. Add test to check proper
active handles are returned.

Alter implementation of GetActiveRequests to match GetActiveHandles'
implementation.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

scovetta pushed a commit to scovetta/node that referenced this pull request

Apr 2, 2016
process.hrtime() was performing too many operations in C++ that could be
done faster in JS. Move those operations over by creating a length 4
Uint32Array and perform bitwise operations on the seconds so that it was
unnecessary for the native API to do any object creation or set any
fields.

This has improved performance from ~350 ns/op to ~65 ns/op. Light
benchmark included to demonstrate the performance change.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

scovetta pushed a commit to scovetta/node that referenced this pull request

Apr 2, 2016
Set process.env array entries in JS.

PR-URL: nodejs#3780
Reviewed-By: Fedor Indutny <fedor@indutny.com>

scovetta pushed a commit to scovetta/node that referenced this pull request

Apr 2, 2016
* http:
  - A new status code was added: 451 - "Unavailable For Legal Reasons"
(Max Barinov) nodejs#4377
  - Idle sockets that have been kept alive now handle errors (José F.
Romaniello) nodejs#4482
* This release also includes several minor performance improvements:
  - assert: deepEqual is now speedier when comparing TypedArrays
(Claudio Rodriguez) nodejs#4330
  - lib: Use arrow functions instead of bind where possible (Minwoo
Jung) nodejs#3622
  - node: Improved accessor perf of process.env (Trevor Norris)
nodejs#3780
  - node: Improved performance of process.hrtime() (Trevor Norris)
nodejs#3780, (Evan Lucas)
nodejs#4484
  - node: Improved GetActiveHandles performance (Trevor Norris)
nodejs#3780
  - util: Use faster iteration in util.format() (Jackson Tian)
nodejs#3964

Refs: nodejs#4547
PR-URL: nodejs#4623
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>