To improve speed I would like to parallelize a loop of this kind:
My actual varlist is long (~30variables) and the computation in the loop is computationally very expensive. It would be amazing if I could compute multiple variables at once (of course each step is indepdendent of each other...).
Code:
global myvars v1 v2 v3 foreach var of varlist $myvars { gen `var'_2 = `var'^2 // here is actually something very computationally extensive }
Comment