Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indices and randomisations: allow re-use of invariant results between analyses #834

Open
shawnlaffan opened this issue Oct 28, 2022 · 1 comment

Comments

@shawnlaffan
Copy link
Owner

shawnlaffan commented Oct 28, 2022

Profiling indicates some of the bottlenecks are where a global precalc needs to be recalculated for each iteration of a randomisation. One example is the tree with equal length branches.

It should be possible to identify randomisations, or other conditions, where these precalcs are unchanged between iterations and then re-use them in the analysis of the random distribution.

For example, globally precalculated tree subsets will be unchanged where the tree is not shuffled by the randomisation and the same set of labels is generated each iteration. This is the common scenario as trees are not often randomised, and the random basedatas most commonly have the richness and range patterns replicated exactly.

@shawnlaffan
Copy link
Owner Author

A possible approach is to add optional arguments to global precalcs and save them into a data structure via global postcalcs. This is then returned to the caller for re-use.

@shawnlaffan shawnlaffan changed the title Indices and randomisations: allow re-use of non-changing results between analyses Indices and randomisations: allow re-use of invariant results between analyses Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant