Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,44 @@
'use strict';
const common = require('../common.js');
const bench = common.createBenchmark(main, {
n: [1e7],
input: [
'',
'a',
'a,b',
'a,b,c',
'a,b,c,d',
],
type: [
'undefined',
'and',
'or',
],
}, {
flags: ['--expose-internals'],
});
function main({ n, input, type }) {
const {
formatList,
} = require('internal/errors');
const list = input.split(',');
if (type === 'undefined') {
bench.start();
for (let i = 0; i < n; ++i) {
formatList(list);
}
bench.end(n);
return;
}
bench.start();
for (let i = 0; i < n; ++i) {
formatList(list, type);
}
bench.end(n);
}