boon/src/main/java/org/boon/primitive/Flt.java
public static double reduceBy( final float[] array, ReduceBy reduceBy ) {


        double sum = 0;
        for ( float v : array ) {
            sum = reduceBy.reduce(sum, v);
        }
        return sum;
    }
public static double reduceBy( final float[] array, ReduceBy reduceBy ) {


        double sum = 0;
        for ( float v : array ) {
            sum = reduceBy.reduce(sum, v);
        }
        return sum;
    }
public static double reduceBy ( final float [ ] array , ReduceBy reduceBy ) { double sum = 0 ; for ( float v : array ) { sum = reduceBy . reduce ( sum , v ) ; } return sum ; }
A very fast reduce by.
If performance is your thing, this seems to be as fast a plain for loop when benchmarking with JMH.

@param array array of items to reduce by
@param reduceBy reduceBy interface
@return the final value
A very fast reduce by . If performance is your thing this seems to be as fast a plain for loop when benchmarking with JMH .