2 ms·
Not my area of expertise, so I want to ask this question: Do compiler optimizations exist to automatically parallelize a for loop, which can be parallelized, no
by RandomInteger4 9y ago
Not my area of expertise, so I want to ask this question: Do compiler optimizations exist to automatically parallelize a for loop, which can be parallelized, no matter how to programmer wrote their for loop?
If not, then map / reduce offers non-trivial performance benefits over a for loop. Mapping, as far as I'm aware, is "embarrassingly parallel", assuming the function that's mapped is pure? I think?
- deleted 9y ago[deleted]
- liveoneggs 9y agoin perl6 this is done with the hyper operator, but for a small data set a for loop (non parallel) will almost always just run faster.