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,31 @@
'use strict';
const common = require('../common.js');
const {
ReadableStream,
} = require('node:stream/web');
const bench = common.createBenchmark(main, {
n: [1e5],
});
async function main({ n }) {
const rs = new ReadableStream({
pull: function(controller) {
controller.enqueue(1);
},
});
let x = 0;
bench.start();
for await (const chunk of rs) {
x += chunk;
if (x > n) {
break;
}
}
// Use x to ensure V8 does not optimize away the loop as a noop.
console.assert(x);
bench.end(n);
}