We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3f1aed commit f08f6a6Copy full SHA for f08f6a6
benchmark/v8/serialize.js
@@ -0,0 +1,17 @@
1
+'use strict';
2
+
3
+const common = require('../common.js');
4
+const v8 = require('v8');
5
6
+const bench = common.createBenchmark(main, {
7
+ len: [256, 1024 * 16, 1024 * 512],
8
+ n: [1e6]
9
+});
10
11
+function main({ n, len }) {
12
+ const typedArray = new BigUint64Array(len);
13
+ bench.start();
14
+ for (let i = 0; i < n; i++)
15
+ v8.serialize({ a: 1, b: typedArray });
16
+ bench.end(n);
17
+}
0 commit comments