parse strings

Benchmark created on


Setup

let input1 = [];
let input2 = [];
for (i = 0; i < 25_000; i++) {
	input1.push("foo:bar");
	input2.push(["foo", "bar"])
}

Teardown

input1 = []
input2 = []

Test runner

Ready to run.

Testing in
TestOps/sec
parse first
new Map(input1.map(x => x.split(":")))
ready
direct set creation
new Map(input2)
ready

Revisions

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