Array vs Object Creation test

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Array
const arrays = new Set()

for(let i = 0; i < 10000; i++) {
	arrays.set([1, "Hello, World!"])
}
ready
Object
const arrays = new Set()

for(let i = 0; i < 10000; i++) {
	arrays.set({t:1,v:"Hello, World!"})
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.