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

19
benchmark/v8/get-stats.js Normal file
View File

@ -0,0 +1,19 @@
'use strict';
const common = require('../common.js');
const v8 = require('v8');
const bench = common.createBenchmark(main, {
method: [
'getHeapStatistics',
'getHeapSpaceStatistics',
],
n: [1e6],
});
function main({ method, n }) {
bench.start();
for (let i = 0; i < n; i++)
v8[method]();
bench.end(n);
}

17
benchmark/v8/serialize.js Normal file
View File

@ -0,0 +1,17 @@
'use strict';
const common = require('../common.js');
const v8 = require('v8');
const bench = common.createBenchmark(main, {
len: [256, 1024 * 16, 1024 * 512],
n: [1e6],
});
function main({ n, len }) {
const typedArray = new BigUint64Array(len);
bench.start();
for (let i = 0; i < n; i++)
v8.serialize({ a: 1, b: typedArray });
bench.end(n);
}