check with added logs

Benchmark created on


Setup

const thingsToLog = [
	"fdsffdsffasd",
	"fdfdfsafdasfds",
	"fdshjafhdsahlfdsa",
	"fdsahfjhdsahfjdsha",
	"fdsffdsffasd",
	"fdfdfsafdasfds",
	"fdshjafhdsahlfdsa",
	"fdsahfjhdsahfjdsha",
]

const waitforme = (shouldLog) => {
	return new Promise((res, rej) => {
		const resolveme = () => {
			if(shouldLog){
				for (var item of thingsToLog) {
					console.log(item)
				}
			}
			res()
		}
		setTimeout(resolveme, 100)
	})
}
const metlog = async () => {
	await waitforme(true)
	return true
}

const zonder = async () => {
	await waitforme(false)
	return true
}

Test runner

Ready to run.

Testing in
TestOps/sec
met log
metlog()
ready
zonder log
zonder()
ready

Revisions

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