Skip to content

feat(rs): use ryu float-to-string conversion#145

Merged
Neclow merged 1 commit intosbhattlab:mainfrom
Neclow:ryu
Oct 19, 2025
Merged

feat(rs): use ryu float-to-string conversion#145
Neclow merged 1 commit intosbhattlab:mainfrom
Neclow:ryu

Conversation

@Neclow
Copy link
Collaborator

@Neclow Neclow commented Oct 18, 2025

~10-20% upgrade in build_newick_with_bls using faster float to string conversion with Ryū.

While this is slower for floats with few decimal (e.g., 0.1) than dtoa, I think arbitrary-like floats are more common in phylo, esp. when it comes to inference.

The library is a bit stricter to convert float (so 1.0 becomes '1.0' and not '1'), so had to modify rust and python tests.

@Neclow
Copy link
Collaborator Author

Neclow commented Oct 19, 2025

Test Name Min (ms) Max (ms) Mean (ms) StdDev (ms) Median (ms) IQR (ms) Outliers OPS (ops/ms) Rounds Iterations
#144 test_matrix_to_newick[100000] 86.1687 (12.90) 91.7940 (12.85) 89.2445 (13.17) 1.6098 (23.36) 89.2792 (13.24) 2.1056 (55.67) 5;0 11.2052 (0.08) 12 1
#145 test_matrix_to_newick[100000] 74.0235 (14.24) 77.7658 (13.59) 76.0513 (14.02) 1.0497 (19.06) 75.9227 (13.99) 1.6031 (46.48) 5;0 13.1490 (0.07) 14 1

@Neclow Neclow merged commit b626218 into sbhattlab:main Oct 19, 2025
8 checks passed
@Neclow Neclow deleted the ryu branch October 19, 2025 13:34
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