Closed mdahirel closed 3 years ago
Bottleneck for tab_intermediate
solved (by moving all operations I could outside of the group_by
) as of https://github.com/mdahirel/pushed-pulled-2020-heritability-IBM/commit/da617ccba5a32a19abf760307284eb48b4ababfc
Made some changes that slightly improve speed, but I think I can't go much faster without working a lot on it/ changing completely the style of this part of the code, and the benefits-costs is not worth it/ it risks making the code harder to read.
So closing the issue
The parts of the
analyse_simulations
code where we build thetab_intermediate
andtab_front
tables seem to be way slower than I remember them too (seem, because I never timed the code, so I may misremember; but I'm almost sure).After a quick check the bottlenecks seem to be at the level of the
mutate()
andsummarise()
calls there (too many groups? too many variables to summarise?)Possible solution: use
map()
to avoid having everything in memory at the same time?