Closed nossleinad closed 2 months ago
This PR accomplishes two things:
deepcopy
copy_partition
copy_message
SWMPartition
Example where we have replaced deepcopy:
tree = sim_tree(n = 100_000) empty_message = [NucleotidePartition(30)] @time MolecularEvolution.random_leaf_init!(tree, empty_message) # main 0.521992 seconds (6.95 M allocations: 379.846 MiB, 24.52% gc time, 9.05% compilation time) # PR 0.405800 seconds (6.73 M allocations: 346.599 MiB, 28.74% gc time, 11.90% compilation time)
Example with SWMPartition:
tree = sim_tree(n = 10_000) @time internal_message_init!(tree, SWMPartition{CodonPartition}(CodonPartition(30), 2)) # main 0.536884 seconds (800.27 k allocations: 1.737 GiB, 29.93% gc time, 1.52% compilation time) # PR 0.355919 seconds (679.98 k allocations: 1.718 GiB, 46.63% gc time)
Follow up to PR #16
This PR accomplishes two things:
deepcopy
withcopy_partition
andcopy_message
throughout the whole packagecopy_partition
forSWMPartition
Example where we have replaced
deepcopy
:Example with SWMPartition: