-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
buffer: removed unused variable conf from buffer-base64-decode & buffer-base64-encode #10175
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
Changes from 1 commit
7243066
4eb18d6
df392f0
08cdc9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…on in buffer-base64-encode & buffer-base64-decode.js
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,20 @@ | ||
| 'use strict'; | ||
| var common = require('../common.js'); | ||
|
|
||
| var bench = common.createBenchmark(main, {}); | ||
| const bench = common.createBenchmark(main, { | ||
| N: [64 * 1024 * 1024], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might want to give this a better name to avoid confusion. I think other benchmarks use names like |
||
| n: [32] | ||
| }); | ||
|
|
||
| function main(conf) { | ||
| var N = 64 * 1024 * 1024; | ||
| var n = conf.n; | ||
| var N = conf.N; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly for these, the values should be prefixed with |
||
| var b = Buffer.allocUnsafe(N); | ||
| var s = ''; | ||
| var i; | ||
| for (i = 0; i < 256; ++i) s += String.fromCharCode(i); | ||
| for (i = 0; i < N; i += 256) b.write(s, i, 256, 'ascii'); | ||
| bench.start(); | ||
| for (i = 0; i < 32; ++i) b.toString('base64'); | ||
| bench.end(64); | ||
| for (i = 0; i < n; ++i) b.toString('base64'); | ||
| bench.end(n); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the change from
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nevermind... just spotted the other comment about it :-) |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
+conf.n.