ghost-tree icon indicating copy to clipboard operation
ghost-tree copied to clipboard

improve most_common_genus complexity (ghosttree.scaffold)

Open JTFouquier opened this issue 9 years ago • 0 comments

Suggestion from D.M.:

line 126, which determines most_common_genus is doing a list lookup for each name, so the runtime of it is O(N * M) where N is the number of entries in otu_genus_list and M is the number of unique names in that list. This can be reduced to around O(N + M) by casting the list to a Counter, and then max'ing the items.

JTFouquier avatar May 06 '15 04:05 JTFouquier