Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-base64-decode.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function main({ n, size }) {
// eslint-disable-next-line node-core/no-unescaped-regexp-dot
s.match(/./); // Flatten string.
assert.strictEqual(s.length % 4, 0);
const b = Buffer.allocUnsafe(s.length / 4 * 3);
const b = Buffer.allocUnsafe(s.length);
b.write(s, 0, s.length, 'base64');
bench.start();
for (var i = 0; i < n; i += 1) b.base64Write(s, 0, s.length);
Expand Down
2 changes: 1 addition & 1 deletion test/benchmark/test-benchmark-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runBenchmark('buffers',
'charsPerLine=6',
'encoding=utf8',
'endian=BE',
'len=2',
'len=256',
'linesCount=1',
'method=',
'n=1',
Expand Down