GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: add v8 serialize benchmark · nodejs/node@a142162

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark/v8
    • serialize.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/v8/serialize.js‎

Copy file name to clipboard
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.