| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Is this intentional?
Sorry, something went wrong.
There was a problem hiding this comment.
Nope. Removed.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with a question.
Sorry, something went wrong.
assertSize() is adjusted to be inlineable according to V8's default function size limits when determining inlineability. This results in up to 11% performance gains when allocating any kind of Buffer.
This change results in ~50% improvement when creating a Buffer from an array-like object.
|
Probably too tangentially related to this PR to be worth doing, but just in case: There's a != on line 172 of lib/buffer.js that seems to be calling out to be replaced with !==. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM after CI.
Sorry, something went wrong.
Sorry, something went wrong.
assertSize() is adjusted to be inlineable according to V8's default function size limits when determining inlineability. This results in up to 11% performance gains when allocating any kind of Buffer. Avoid avoids use of in, resulting in ~50% improvement when creating a Buffer from an array-like object. PR-URL: #10443 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
assertSize() is adjusted to be inlineable according to V8's default function size limits when determining inlineability. This results in up to 11% performance gains when allocating any kind of Buffer. Avoid avoids use of in, resulting in ~50% improvement when creating a Buffer from an array-like object. PR-URL: #10443 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Notable changes: * buffer: - Improve performance of Buffer allocation by ~11% (Brian White) #10443 - Improve performance of Buffer.from() by ~50% (Brian White) #10443 * events: Improve performance of EventEmitter.once() by ~27% (Brian White) #10445 * http: Improve performance of http server by ~7% (Brian White) #6533
assertSize() is adjusted to be inlineable according to V8's default function size limits when determining inlineability. This results in up to 11% performance gains when allocating any kind of Buffer. Avoid avoids use of in, resulting in ~50% improvement when creating a Buffer from an array-like object. PR-URL: #10443 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Notable changes: * buffer: - Improve performance of Buffer allocation by ~11% (Brian White) #10443 - Improve performance of Buffer.from() by ~50% (Brian White) #10443 * events: Improve performance of EventEmitter.once() by ~27% (Brian White) #10445 * fs: Allow passing Uint8Array to fs methods where Buffers are supported. (Anna Henningsen) #10382 * http: Improve performance of http server by ~7% (Brian White) #6533 * npm: Upgrade to v4.0.5 (Kat Marchán) #10330 PR-URL: #10589
Notable changes: * buffer: - Improve performance of Buffer allocation by ~11% (Brian White) #10443 - Improve performance of Buffer.from() by ~50% (Brian White) #10443 * events: Improve performance of EventEmitter.once() by ~27% (Brian White) #10445 * fs: Allow passing Uint8Array to fs methods where Buffers are supported. (Anna Henningsen) #10382 * http: Improve performance of http server by ~7% (Brian White) #6533 * npm: Upgrade to v4.0.5 (Kat Marchán) #10330 PR-URL: #10589
|
Adding LTS watch, likely should bake a bit longer before landing. |
Sorry, something went wrong.
Notable changes:
* buffer:
- Improve performance of Buffer allocation by ~11% (Brian White) nodejs/node#10443
- Improve performance of Buffer.from() by ~50% (Brian White) nodejs/node#10443
* events: Improve performance of EventEmitter.once() by ~27% (Brian White) nodejs/node#10445
* fs: Allow passing Uint8Array to fs methods where Buffers are supported. (Anna Henningsen) nodejs/node#10382
* http: Improve performance of http server by ~7% (Brian White) nodejs/node#6533
* npm: Upgrade to v4.0.5 (Kat Marchán) nodejs/node#10330
PR-URL: nodejs/node#10589
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
Description of change
Improve Buffer allocation performance (up to ~11%) by making assertSize() inlineable and improve Buffer.from(arrayLike) performance (~50%) by replacing the usage of the in operator when checking for a length property.
Relevant benchmark results:
Buffer allocation:
Buffer.from(arrayLike):
/cc @nodejs/buffer
CI: https://ci.nodejs.org/job/node-test-pull-request/5580/