safeNav (v91)

Revision 91 of this benchmark created on


Setup

var n = {
	f1: {
		f2: [
			{
		name: 'name1',
		salary: 300,
		age: 28,
	},
	{
		name: 'name2',
		salary: 400,
		age: 29,
	},
	{
		name: 'name3',
		salary: 500,
		age: 30,
	},
	{
		name: 'name4',
		salary: 600,
		age: 31,
	},
	{
		name: 'name5',
		salary: 700,
		age: 32,
	},
	]
	}
}

Test runner

Ready to run.

Testing in
TestOps/sec
safe navigation
const testFunc = (data) => data.f1?.f2?.map(e => e?.map(el => el?.name))

testFunc(n)
ready
non prototype
const testFunc2 = (data) => data.f1.f2.map(e => e.map(el => el?.name))

testFunc2(n)
ready

Revisions

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