Test name | Executions per second |
---|---|
1 | 517653984.0 Ops/sec |
2 | 529162592.0 Ops/sec |
3 | 532078112.0 Ops/sec |
function t() {
const h = {
a: null,
b: null,
};
h.a = Math.random();
h.b = Math.floor(Math.random() * 1200);
return h;
}
function t() {
const a = Math.random();
const b = Math.flooe(Math.random() * 1200);
return { a, b };
}
function t() {
const h = {
a: null,
b: null,
};
a = Math.random();
b = Math.floor(Math.random() * 1200);
return Object.assign(h, {a,b});
}