Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
asdsasdsadasdas
(version: 0)
asdasdsasaasdasdsa
Comparing performance of:
default vs object.defineprop vs reflect.defineprop
Created:
4 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var numbers = Array(1000).fill(null).map((x, i) => i.toString());
Tests:
default
numbers.reduce((acc, n) => { acc[n] = n; return acc }, {});
object.defineprop
numbers.reduce((acc, n) => { Object.defineProperty(acc, [n], { value: n }); return acc }, {});
reflect.defineprop
numbers.reduce((acc, n) => { Reflect.defineProperty(acc, [n], { value: n }); return acc }, {});
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
default
object.defineprop
reflect.defineprop
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
parseInt vs toString vs string literal vs + empty string
parseInt vs toString vs unary(+)
parseInt vs Number // toString vs String
number to string js
String to number conversion in Vanilla JS + number to string
Comments
Confirm delete:
Do you really want to delete benchmark?