Skip to content

Commit

Permalink
Cluster spatial calcs: add lists by ref
Browse files Browse the repository at this point in the history
Avoids a lot of copying.
  • Loading branch information
shawnlaffan committed Feb 24, 2024
1 parent 7586528 commit 0c34d12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Biodiverse/Cluster.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2827,7 +2827,10 @@ sub sp_calc {
if (is_arrayref($sp_calc_values{$key})
|| is_hashref($sp_calc_values{$key})) {

$node->add_to_lists ($key => $sp_calc_values{$key});
$node->add_to_lists (
$key => $sp_calc_values{$key},
use_ref => 1,
);
delete $sp_calc_values{$key};
}
}
Expand Down

0 comments on commit 0c34d12

Please sign in to comment.