I have these two bits of code that need to run, and Im trying to figure out what's the optimal way.
So far, Iv'e only been able to benchmark the for loop.
Also, differently from the examples I saw online, I cannot see the objects bnch_loop and bnch_future created in my code..
Any thoughts?
bnch_loop<-bench::mark(
for (i in 1:16) {
nested_inter$model[[i]]<- nb_thesis_inter(df= nested_nb$data[[i]], mdl= nested_nb$model[[i]])
})
plan(multisession, workers = 8)
bnch_future<-bench::mark(
nested_inter$model2 = future_Map(nb_thesis_inter,
nested_nb$data,
nested_nb$model))