mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
querystring: improve stringify() performance
PR-URL: https://github.com/nodejs/node/pull/33669 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
parent
76ceaff270
commit
7b46793eee
3 changed files with 47 additions and 14 deletions
|
@ -3,7 +3,7 @@ const common = require('../common.js');
|
|||
const querystring = require('querystring');
|
||||
|
||||
const bench = common.createBenchmark(main, {
|
||||
type: ['noencode', 'encodemany', 'encodelast', 'array'],
|
||||
type: ['noencode', 'encodemany', 'encodelast', 'array', 'multiprimitives'],
|
||||
n: [1e6],
|
||||
});
|
||||
|
||||
|
@ -28,7 +28,12 @@ function main({ type, n }) {
|
|||
foo: [],
|
||||
baz: ['bar'],
|
||||
xyzzy: ['bar', 'quux', 'thud']
|
||||
}
|
||||
},
|
||||
multiprimitives: {
|
||||
foo: false,
|
||||
bar: -13.37,
|
||||
baz: '',
|
||||
},
|
||||
};
|
||||
const input = inputs[type];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue