-
Notifications
You must be signed in to change notification settings - Fork 19
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
Index and other optimisations #922
Commits on Feb 23, 2024
-
Indices: optimise _calc_endemism_absolute
Take advantage of the label hash global precalc, and use hash aliases instead of refs.
Configuration menu - View commit details
-
Copy full SHA for 11a9bbe - Browse repository at this point
Copy the full SHA 11a9bbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 501bd7b - Browse repository at this point
Copy the full SHA 501bd7bView commit details -
TreeNode.pm: use a linear scan for get_hash_lists_below
Might as well avoid any recursion overheads.
Configuration menu - View commit details
-
Copy full SHA for f9bcf98 - Browse repository at this point
Copy the full SHA f9bcf98View commit details -
Add an array args version of set_basedata_ref
And stop throwing errors when ref is undefined in get_basedata_ref.
Configuration menu - View commit details
-
Copy full SHA for 1e7deb8 - Browse repository at this point
Copy the full SHA 1e7deb8View commit details -
Trees: clone_without_caches also clears parameters
This was we avoid cloning basedata refs, analysis args and the like.
Configuration menu - View commit details
-
Copy full SHA for 4dec15f - Browse repository at this point
Copy the full SHA 4dec15fView commit details -
Common::get_zscore_from_comp_results - avoid a lot of grepping
No need to find the index names when they are in the base_list_ref already. Also use refaliasing to avoid some derefs and declutter loop variables.
Configuration menu - View commit details
-
Copy full SHA for 965c1ad - Browse repository at this point
Copy the full SHA 965c1adView commit details -
optimise Tree::convert_comparisons_to_significances
Passing in the base list allows fewer grep comparisons. This makes a large difference when there are many lists with many keys.
Configuration menu - View commit details
-
Copy full SHA for 6ee1109 - Browse repository at this point
Copy the full SHA 6ee1109View commit details -
optimise Spatial::convert_comparisons_to_significances
Passing in the base list allows fewer grep comparisons. This makes a large difference when there are many lists with many keys.
Configuration menu - View commit details
-
Copy full SHA for 80bc505 - Browse repository at this point
Copy the full SHA 80bc505View commit details -
Indices: add a hierarchical mode flag
This allows future optimisations when calculating indices for cluster trees.
Configuration menu - View commit details
-
Copy full SHA for 81f38b3 - Browse repository at this point
Copy the full SHA 81f38b3View commit details -
Indices: Support hierarchical calculations
This allows several indices to be optimised when calculated for cluster nodes, providing they are done starting from the tips. PE has been optimised in this commit.
Configuration menu - View commit details
-
Copy full SHA for 1c6a509 - Browse repository at this point
Copy the full SHA 1c6a509View commit details -
Indices: calc_labels_not_on_tree: return early if nothing to work with
Avoids a lot of hash creation and deletion with large datasets.
Configuration menu - View commit details
-
Copy full SHA for 5d6a8b4 - Browse repository at this point
Copy the full SHA 5d6a8b4View commit details -
Indices: add a hierarchical variant of get_path_lengths_to_root_node
Speeds up PD calcs for cluster trees.
Configuration menu - View commit details
-
Copy full SHA for 67f655e - Browse repository at this point
Copy the full SHA 67f655eView commit details -
Indices: _calc_endemism_hier_part: avoid some method calls
Use a treenode method that caches, rather than repeatedly calling methods to get the same answer.
Configuration menu - View commit details
-
Copy full SHA for 6d9c553 - Browse repository at this point
Copy the full SHA 6d9c553View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a69ac2 - Browse repository at this point
Copy the full SHA 8a69ac2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a37dbb3 - Browse repository at this point
Copy the full SHA a37dbb3View commit details
Commits on Feb 24, 2024
-
Indices: refactor hierarchical node details
It is cleaner to pack the node and child names in their own structure. That also enables later additions without adding yet more top level arguments.
Configuration menu - View commit details
-
Copy full SHA for 9b1846d - Browse repository at this point
Copy the full SHA 9b1846dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 744c430 - Browse repository at this point
Copy the full SHA 744c430View commit details -
TreeNode::add_to_lists: optimise
Use direct assignment if starting with empty list.
Configuration menu - View commit details
-
Copy full SHA for 7586528 - Browse repository at this point
Copy the full SHA 7586528View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c34d12 - Browse repository at this point
Copy the full SHA 0c34d12View commit details -
compare_lists_by_item: lift a var outside the loop
This can be a _very_ hot loop so even small differences add up.
Configuration menu - View commit details
-
Copy full SHA for 4168546 - Browse repository at this point
Copy the full SHA 4168546View commit details -
Indices: cache the current results from each sub
These are cleared as we go to avoid leakage.
Configuration menu - View commit details
-
Copy full SHA for b2ee3ed - Browse repository at this point
Copy the full SHA b2ee3edView commit details -
Indices: reuse whole and central endemism results when appropriate
If the second neighbour set is empty then the whole and central variants return the same results. So short circuit in these cases.
Configuration menu - View commit details
-
Copy full SHA for e173a47 - Browse repository at this point
Copy the full SHA e173a47View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16a4f86 - Browse repository at this point
Copy the full SHA 16a4f86View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62fd8a1 - Browse repository at this point
Copy the full SHA 62fd8a1View commit details