Is there any room for some parallelization here? Maybe we can have the option to compute functions in parallel in an OpenMP loop?