Direct execution vs Method

Benchmark created on


Setup

class Test {
	constructor() {
		this.a = 0;
		this.b = 0;	
	}
	
	tick() {
		if(this._a !== this._b) {
			return true;
		}
		
		return false;
	}
}

const a = 0;
const b = 0;
const test = new Test();

Test runner

Ready to run.

Testing in
TestOps/sec
Direct Execution
if(a !== b){
	return true;
}
ready
Method Call
test.tick();
ready

Revisions

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