varfish-org / hgvs-rs

A port of biocommons/hgvs to the Rust programming language
Apache License 2.0
11 stars 4 forks source link

fix: use array instead of Vec for Codon representation (and other free perf improvements) #169

Closed tedil closed 6 months ago

tedil commented 6 months ago
codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 83.33333% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 87.42%. Comparing base (721d606) to head (2b08951).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #169 +/- ## ========================================== - Coverage 87.42% 87.42% -0.01% ========================================== Files 18 18 Lines 7700 7705 +5 ========================================== + Hits 6732 6736 +4 - Misses 968 969 +1 ``` | [Files](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/169?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org) | Coverage Δ | | |---|---|---| | [src/sequences.rs](https://app.codecov.io/gh/varfish-org/hgvs-rs/pull/169?src=pr&el=tree&filepath=src%2Fsequences.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=varfish-org#diff-c3JjL3NlcXVlbmNlcy5ycw==) | `98.28% <83.33%> (-0.11%)` | :arrow_down: |
xiamaz commented 6 months ago

Thanks a lot. This generally looks good. How much performance impact are you seeing in a test case?

tedil commented 6 months ago

main branch

     Running benches/translate_cds.rs (target/release/deps/translate_cds-c57b7f59d5053bc8)
translate_cds TTN       time:   [153.05 µs 153.31 µs 153.61 µs]
Found 14 outliers among 100 measurements (14.00%)
  5 (5.00%) high mild
  9 (9.00%) high severe

perf-codon-repr branch

     Running benches/translate_cds.rs (target/release/deps/translate_cds-41f293dcbeaaadcb)
translate_cds TTN       time:   [120.43 µs 121.08 µs 121.87 µs]
                        change: [-20.521% -19.639% -18.312%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  3 (3.00%) high mild
  8 (8.00%) high severe