The efficiency of simulate_chains() could be improved by avoiding creating data frames in the main loop body (e.g. careful use of list2Df instead) and by avoiding tapply calls. Whilst the current implementation is readable, the code is being used for benchmarking Julia over in https://github.com/epiforecasts/EpiBranch.jl.
Whilst you’re unlikely to match the performance I don’t think the difference should be as much as currently showing in the aforementioned repo.
The efficiency of simulate_chains() could be improved by avoiding creating data frames in the main loop body (e.g. careful use of list2Df instead) and by avoiding tapply calls. Whilst the current implementation is readable, the code is being used for benchmarking Julia over in https://github.com/epiforecasts/EpiBranch.jl.
Whilst you’re unlikely to match the performance I don’t think the difference should be as much as currently showing in the aforementioned repo.