a

Benchmark created on


Preparation HTML

<div></div>

Setup

function auth() {
	const returnUrl = `https://www.baidu.com?returnUri={encodeURIComponent('/back')}`
	return {returnUrl}
}




Teardown

function getUrl() {
	return `https://www.baidu.com?returnUri={encodeURIComponent('/back')}`
}

function auth() {
	return {
		get returnUrl() {
			return getUrl();
	}
	}
}

Test runner

Ready to run.

Testing in
TestOps/sec
few times
var ret = auth();
ret.returnUrl
ret.returnUrl
ret.returnUrl
ready
multi time
var ret = auth();
for (let i = 0; i < 1000; i++) {
	ret.returnUrl
}

ready

Revisions

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