Skip to content

c++ for normalize_splits#257

Merged
ms609 merged 2 commits intomainfrom
batch-as-splits
Mar 13, 2026
Merged

c++ for normalize_splits#257
ms609 merged 2 commits intomainfrom
batch-as-splits

Conversation

@ms609
Copy link
Copy Markdown
Owner

@ms609 ms609 commented Mar 13, 2026

(Badly named branch!)

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.33%. Comparing base (a13532f) to head (54484ce).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #257   +/-   ##
=======================================
  Coverage   96.32%   96.33%           
=======================================
  Files          77       77           
  Lines        5749     5758    +9     
=======================================
+ Hits         5538     5547    +9     
  Misses        211      211           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

_init.R: do.call(bench::mark, args) evaluates expressions before
passing them, so bench stored the evaluated result (e.g. a phylo
tree) instead of the call. Restored direct ... passthrough.

_compare_results.R: Use deparse1() instead of as.character(unlist())
for expression extraction (the latter decomposes call objects into
components). Also iterate by index to guard against NA names, and
use res$change instead of outer-scope percentage_change.
@github-actions
Copy link
Copy Markdown

Performance benchmark results

Call Status Change Time (ms)
as.Splits(bigTrees) ⚪ NSD 5.74% 23.1 →
21.7, 21.7
as.Splits(someTrees) ⚪ NSD -0.6% 11.1 →
11.2, 11.1
Consensus(forest1k.888, check = FALSE) ⚪ NSD -1.76% 94.5 →
97.5, 94.9
Consensus(forest201.80, check = FALSE) ⚪ NSD -0.15% 4.05 →
4.1, 3.99
Consensus(forest21.260, 0.5, FALSE) ⚪ NSD -0.95% 1.22 →
1.24, 1.22
Consensus(forest21.260) ⚪ NSD -1.05% 1.23 →
1.25, 1.23
Consensus(forestMaj, 0.5, FALSE) ⚪ NSD -1.58% 2.94 →
2.99, 2.94
DropTip(tr2000, 5) ⚪ NSD 1.73% 16.8 →
16.5, 16.4
DropTip(tr80, 5) ⚪ NSD 0.14% 0.103 →
0.103, 0.102
DropTip(unlen2k, 5) ⚪ NSD -1% 0.21 →
0.219, 0.204
DropTip(unlen80, 5) ⚪ NSD 0.13% 0.0398 →
0.0399, 0.0395
lapply(bigSplits, as.phylo) ⚪ NSD -0.28% 29.1 →
29.6, 28.8
lapply(someSplits, as.phylo) ⚪ NSD -1.97% 13.5 →
13.9, 13.7
PathLengths(tr2000, full = TRUE) ⚪ NSD -0.2% 16 →
16.1, 15.8
PathLengths(tr80, full = TRUE) ⚪ NSD 2.12% 0.0418 →
0.0415, 0.0404
PathLengths(tr80Unif, full = TRUE) ⚪ NSD 2.44% 0.0438 →
0.0427, 0.0428
RootTree(tr2000, 5) ⚪ NSD 3.88% 0.388 →
0.372, 0.374
RootTree(tr80, c("t3", "t36")) ⚪ NSD -0.47% 0.0699 →
0.0702, 0.0703
RootTree(tr80, "t3") ⚪ NSD 1.52% 0.0502 →
0.0501, 0.0486
RootTree(tr80, "t30") ⚪ NSD 2.11% 0.0503 →
0.0494, 0.0489
RootTree(unlen2k, 5) ⚪ NSD -3.92% 0.319 →
0.331, 0.333
RootTree(unlen80, c("t3", "t36")) ⚪ NSD 0.52% 0.064 →
0.0631, 0.0641
RootTree(unlen80, "t3") ⚪ NSD -0.61% 0.0429 →
0.0428, 0.0435
RootTree(unlen80, "t30") ⚪ NSD -0.88% 0.0431 →
0.043, 0.0438
TreeDist::RobinsonFoulds(forest201.80) ⚪ NSD -2.14% 15.5 →
15.8, 15.7
TreeDist::RobinsonFoulds(forest21.888) ⚪ NSD -2.73% 3.21 →
3.27, 3.32
TreeTools:::path_lengths(tr80$edge, tr80$edge.length, FALSE) ⚪ NSD 2.29% 0.104 →
0.102, 0.102
TreeTools:::postorder_order(bal40) ⚪ NSD 0.57% 0.00175 →
0.00173, 0.00175
TreeTools:::postorder_order(bal40k) ⚪ NSD -1.23% 0.422 →
0.432, 0.425
TreeTools:::postorder_order(dbal40) ⚪ NSD 1.63% 0.00184 →
0.0018, 0.00181
TreeTools:::postorder_order(dbal40k) 🟢 Faster! 9.84% 2.36 →
2.16, 2.1
TreeTools:::postorder_order(dpec40) ⚪ NSD 15.31% 0.00308 →
0.00259, 0.00262
TreeTools:::postorder_order(dpec40k) 🟣 ~same 5.86% 3620 →
3400, 3410
TreeTools:::postorder_order(drnd80) ⚪ NSD 20.24% 0.00515 →
0.0041, 0.00411
TreeTools:::postorder_order(nbal40) ⚪ NSD 2.24% 0.00221 →
0.00215, 0.00217
TreeTools:::postorder_order(nbal40k) 🟢 Faster! 9.91% 2.42 →
2.18, 2.17
TreeTools:::postorder_order(npec40) ⚪ NSD 14.21% 0.00339 →
0.00287, 0.00293
TreeTools:::postorder_order(npec40k) 🟣 ~same 5.78% 3640 →
3430, 3430
TreeTools:::postorder_order(nrnd80) ⚪ NSD 18.34% 0.00568 →
0.00461, 0.00466
TreeTools:::postorder_order(pec40) ⚪ NSD -0.58% 0.00172 →
0.00172, 0.00174
TreeTools:::postorder_order(pec40k) ⚪ NSD -1.11% 0.422 →
0.426, 0.427
TreeTools:::postorder_order(rnd80) ⚪ NSD -1.39% 0.00215 →
0.00217, 0.00219

@ms609 ms609 merged commit 0d7feda into main Mar 13, 2026
36 checks passed
@ms609 ms609 deleted the batch-as-splits branch March 13, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant