mapreduce combines reduce and map into a single function, avoiding
allocating intermediate arrays. This improves performance by a factor of ~3.
Some benchmarks on Myriad. Before PR:
[cceamgi@login13 julia_func_pi_dir]$ ./run.sh
Calculating PI using:
50000000 slices
1 worker(s)
Obtained value of PI: 3.1415926535897936
Time taken: 0.4528329372406006 seconds
[cceamgi@login13 julia_func_pi_dir]$ ./run.sh 1000000000
Calculating PI using:
1000000000 slices
1 worker(s)
Obtained value of PI: 3.141592653589793
Time taken: 12.335363149642944 seconds
After PR:
[cceamgi@login13 julia_func_pi_dir]$ ./run.sh
Warming up...done. [0.262s]
Calculating PI using:
1000000000 slices
1 worker(s)
Obtained value of PI: 3.141592653589793
Time taken: 4.437 seconds
mapreduce
combinesreduce
andmap
into a single function, avoiding allocating intermediate arrays. This improves performance by a factor of ~3.Some benchmarks on Myriad. Before PR:
After PR: