function createBenchmark( len, shape, xtype, ytype, order ) {
	var strides;
	var opts;
	var xbuf;
	var x;
	var y;

	xbuf = discreteUniform( len, -100, 100, {
		'dtype': xtype
	});
	strides = shape2strides( shape, order );
	x = ndarray( xtype, xbuf, shape, strides, 0, order );
	opts = {
		'dtype': ytype
	};
	return benchmark;

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

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			y = filter( x, opts, predicate );
			if ( isnan( y.data[ i%y.length ] ) ) {
				b.fail( 'should not return NaN' );
			}
		}
		b.toc();
		if ( !isndarrayLike( y ) ) {
			b.fail( 'should return an ndarray' );
		}
		b.pass( 'benchmark finished' );
		b.end();
	}
}
Creates a benchmark function.

@private
@param {PositiveInteger} len - ndarray length
@param {NonNegativeIntegerArray} shape - ndarray shape
@param {string} xtype - input ndarray data type
@param {string} ytype - output ndarray data type
@param {string} order - ndarray memory layout
@returns {Function} benchmark function