lib/benchmark.js
function getFunctionOverhead(runs) {

		var result,
		    dummy,
		    start,
		    i;

		// The dummy has to return something,
		// or it'll get insanely optimized
		dummy = Function('return 1');

		// Call dummy now to get it jitted
		dummy();

		start = Blast.performanceNow();

		for (i = 0; i < runs; i++) {
			dummy();
		}

		result = Blast.performanceNow() - start;

		// When doing coverage this can increase a lot, giving weird results
		if (result > 1) {
			result = 0.5;
		}

		return result;
	}
function getFunctionOverhead(runs) {

		var result,
		    dummy,
		    start,
		    i;

		// The dummy has to return something,
		// or it'll get insanely optimized
		dummy = Function('return 1');

		// Call dummy now to get it jitted
		dummy();

		start = Blast.performanceNow();

		for (i = 0; i < runs; i++) {
			dummy();
		}

		result = Blast.performanceNow() - start;

		// When doing coverage this can increase a lot, giving weird results
		if (result > 1) {
			result = 0.5;
		}

		return result;
	}
function getFunctionOverhead ( runs ) { var result , dummy , start , i ; // The dummy has to return something, // or it'll get insanely optimized dummy = Function ( 'return 1' ) ; // Call dummy now to get it jitted dummy ( ) ; start = Blast . performanceNow ( ) ; for ( i = 0 ; i < runs ; i ++ ) { dummy ( ) ; } result = Blast . performanceNow ( ) - start ; // When doing coverage this can increase a lot, giving weird results if ( result > 1 ) { result = 0.5 ; } return result ; }
This function determines the ms overhead cost of calling a
function the given amount of time

@author   Jelle De Loecker   <jelle@develry.be>
@since    0.1.2
@version  0.5.4

@param    {Number}   runs
This function determines the ms overhead cost of calling a function the given amount of time