function createBenchmark( ndims ) {
	var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );
	return benchmark;

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

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			out = prependSingletonDimensions( x, ndims );
			if ( typeof out !== 'object' ) {
				b.fail( 'should return an object' );
			}
		}
		b.toc();
		if ( !isndarrayLike( out ) ) {
			b.fail( 'should return an ndarray' );
		}
		b.pass( 'benchmark finished' );
		b.end();
	}
}
Creates a benchmark function.

@private
@param {PositiveInteger} ndims - number of singleton dimensions
@returns {Function} benchmark function