Is there any point to use promise all() to speed up an expensive computation ? For example:
// Expensive computation
const data = [1, 2, 3];
const f = (x) => {
return x*x; // or a more complex formula
}
// No promises
const f_data = data.map(f);
// With promises
const f_data = Promise.all(data.map((e) => Promise((e) => f(e))).then(res => res).catch(...);
Will there be any actual difference in execution speed ?