In big data processing job, does function "fold" have lower computation performance compared with function "reduce" ?
For instance, I have the following two functions:
array1.indices.zip(array1).map(x => x._1 * x._2).reduce(_ + _)
array1.indices.zip(array1).map(x => x._1 * x._2).fold(0.0) {_ + _}
array1 is a very huge rdd array. which function has higher computation performance giving the same clustering setting.