function createBenchmark( size ) {
	var types;
	var data;
	var fcn;
	var x;
	var y;
	var t;
	var i;

	types = [];

	// Create dummy types...
	for ( i = 0; i < (size-1)*2; i += 2 ) {
		t = 'foo' + i;
		types.push( t );
		types.push( t );
	}
	// Append test types:
	types.push( 'float64' );
	types.push( 'float64' );

	// Define a list of callbacks:
	data = [];
	for ( i = 0; i < size-1; i++ ) {
		data.push( throwError );
	}
	// Append a test callback:
	data.push( identity );

	// Create the dispatcher:
	fcn = dispatch( unary, types, data, 2, 1, 1 );

	// Create sample arrays:
	x = new Float64Array( 1 );
	y = new Float64Array( x.length );

	x = ndarray( 'float64', x, [ 1 ], [ 1 ], 0, 'row-major' );
	y = ndarray( 'float64', y, [ 1 ], [ 1 ], 0, 'row-major' );

	return benchmark;

	/**
	* Benchmark function.
	*
	* @private
	* @param {Benchmark} b - benchmark instance
	*/
	function benchmark( b ) {
		var z;
		var i;

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			x.data[ 0 ] = i;
			z = fcn( x, y );
			if ( isnan( z.data[ 0 ] ) ) {
				b.fail( 'should not return NaN' );
			}
		}
		b.toc();
		if ( isnan( z.data[ 0 ] ) ) {
			b.fail( 'should not return NaN' );
		}
		b.pass( 'benchmark finished' );
		b.end();
	}
}
Creates a benchmark function.

@private
@param {PositiveInteger} size - dispatch size
@returns {Function} benchmark function