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.
util.toUSVString()
1 parent 43291b9 commit 0ee0ed1Copy full SHA for 0ee0ed1
1 file changed
benchmark/util/to-usv-string.js
@@ -0,0 +1,21 @@
1
+'use strict';
2
+
3
+const common = require('../common');
4
5
+const BASE = 'string\ud801';
6
7
+const bench = common.createBenchmark(main, {
8
+ n: [1e5],
9
+ size: [10, 100, 500],
10
+});
11
12
+function main({ n, size }) {
13
+ const { toUSVString } = require('util');
14
+ const str = BASE.repeat(size);
15
16
+ bench.start();
17
+ for (let i = 0; i < n; i++) {
18
+ toUSVString(str);
19
+ }
20
+ bench.end(n);
21
+}
0 commit comments