Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1045,11 +1045,11 @@ def benchmark_phylo_tag_masking(num_iterations: int = 1000) -> tuple[float, floa
return old_time, new_time


def test_phylo_tag_masking_speed():
def test_phylo_tag_masking_speed(minimal_threshold: float = 0.6):
num_iterations = 2000
old_time, new_time = benchmark_phylo_tag_masking(num_iterations=num_iterations)
# Assert performance equivalent to within 20% or better on a small example.
assert old_time / num_iterations > (new_time / num_iterations) * 0.8
# Assert performance equivalent to no worse than 60% of the original implementation.
assert old_time / num_iterations > (new_time / num_iterations) * minimal_threshold


if __name__ == "__main__":
Expand Down
Loading