Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer: improve from() performance #31615

Merged
merged 1 commit into from
Feb 9, 2020

Conversation

mscdex
Copy link
Contributor

@mscdex mscdex commented Feb 2, 2020

Benchmark results:

                                                                confidence improvement accuracy (*)   (**)  (***)
 buffers/buffer-from.js n=800000 len=100 source='array'               ***     53.81 %       ±2.01% ±2.70% ±3.59%
 buffers/buffer-from.js n=800000 len=100 source='buffer'              ***     53.09 %       ±1.91% ±2.54% ±3.30%
 buffers/buffer-from.js n=800000 len=100 source='object'              ***     11.22 %       ±2.92% ±3.89% ±5.07%
 buffers/buffer-from.js n=800000 len=100 source='uint16array'         ***     47.57 %       ±1.62% ±2.16% ±2.82%
 buffers/buffer-from.js n=800000 len=100 source='uint8array'          ***     52.46 %       ±1.88% ±2.53% ±3.34%
 buffers/buffer-from.js n=800000 len=2048 source='array'              ***    147.71 %       ±1.20% ±1.61% ±2.13%
 buffers/buffer-from.js n=800000 len=2048 source='buffer'             ***      8.93 %       ±1.23% ±1.64% ±2.14%
 buffers/buffer-from.js n=800000 len=2048 source='object'             ***      8.92 %       ±3.90% ±5.20% ±6.78%
 buffers/buffer-from.js n=800000 len=2048 source='uint16array'        ***    313.08 %       ±1.83% ±2.46% ±3.26%
 buffers/buffer-from.js n=800000 len=2048 source='uint8array'         ***      6.70 %       ±1.64% ±2.20% ±2.89%
 buffers/buffer-from.js n=800000 len=8192 source='array'              ***     47.04 %       ±0.90% ±1.21% ±1.60%
 buffers/buffer-from.js n=800000 len=8192 source='buffer'             ***      6.58 %       ±2.14% ±2.86% ±3.73%
 buffers/buffer-from.js n=800000 len=8192 source='object'             ***     10.50 %       ±2.70% ±3.60% ±4.71%
 buffers/buffer-from.js n=800000 len=8192 source='uint16array'        ***    338.05 %       ±3.12% ±4.21% ±5.58%
 buffers/buffer-from.js n=800000 len=8192 source='uint8array'         ***      5.25 %       ±1.99% ±2.65% ±3.45%
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@mscdex mscdex added buffer Issues and PRs related to the buffer subsystem. performance Issues and PRs related to the performance of Node.js. labels Feb 2, 2020
@nodejs-github-bot
Copy link
Collaborator

@mscdex mscdex added the wip Issues and PRs that are still a work in progress. label Feb 2, 2020
@jasnell
Copy link
Member

jasnell commented Feb 2, 2020

@mscdex ... just curious, why is this work in progress? Seems straightforward enough.

@mscdex mscdex force-pushed the buffer-improve-from-uint8array-perf branch from 8c7ca32 to 3deb306 Compare February 2, 2020 21:05
@mscdex mscdex changed the title buffer: improve from(uint8array) performance buffer: improve from() performance Feb 2, 2020
@nodejs-github-bot
Copy link
Collaborator

@mscdex
Copy link
Contributor Author

mscdex commented Feb 2, 2020

@jasnell I found additional changes that provided even greater benefit.

@mscdex mscdex removed the wip Issues and PRs that are still a work in progress. label Feb 2, 2020
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 7, 2020
@nodejs-github-bot
Copy link
Collaborator

PR-URL: nodejs#31615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@mscdex mscdex force-pushed the buffer-improve-from-uint8array-perf branch from 3deb306 to 74291e4 Compare February 9, 2020 02:41
@mscdex mscdex merged commit 74291e4 into nodejs:master Feb 9, 2020
@mscdex mscdex deleted the buffer-improve-from-uint8array-perf branch February 9, 2020 02:42
codebytere pushed a commit that referenced this pull request Feb 17, 2020
PR-URL: #31615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@codebytere codebytere mentioned this pull request Feb 17, 2020
codebytere pushed a commit that referenced this pull request Mar 15, 2020
PR-URL: #31615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
PR-URL: #31615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@codebytere codebytere mentioned this pull request Mar 17, 2020
codebytere pushed a commit that referenced this pull request Mar 30, 2020
PR-URL: #31615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. buffer Issues and PRs related to the buffer subsystem. performance Issues and PRs related to the performance of Node.js.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants