Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use upstream stlrs crate #37

Merged
merged 3 commits into from
Sep 25, 2023
Merged

Use upstream stlrs crate #37

merged 3 commits into from
Sep 25, 2023

Conversation

sd2k
Copy link
Collaborator

@sd2k sd2k commented Sep 18, 2023

This mainly just means we have to cast things between f32 and f64, because the released version of stl-rs doesn't include f64 compatibility (see ankane/stl-rust#6 and ankane/stl-rust#2).

Note that this still currently points towards a fork of stl-rs, but at least all the incorporated changes are more likely to be merged and released soon, at which point this can be updated to use a non-git dependency.

Unfortunately this results in some benchmark regressions compared to using a fork, probably due to the extra clones and having to convert to/from f32 :(

     Running benches/vic_elec.rs (target/release/deps/vic_elec-36a0fad3091799a8)
vic_elec                time:   [28.569 ms 28.591 ms 28.619 ms]
                        change: [+11.550% +11.750% +11.918%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
  3 (3.00%) high mild
  5 (5.00%) high severe

@sd2k

This comment was marked as outdated.

This mainly just means we have to clone a little more and cast things
between f32 and f64, because the released version of stl-rs doesn't
allow us to take ownership of the various components and doesn't include
f64 compatibility.

Note that this still currently points towards the main git branch for
stl-rust, but at least all the incorporated changes are more likely to
be merged sooner or later!

Unfortunately this results in some benchmark regressions, probably due
to the extra clones and having to convert to/from f32 :(

```
     Running benches/vic_elec.rs (target/release/deps/vic_elec-36a0fad3091799a8)
vic_elec                time:   [28.569 ms 28.591 ms 28.619 ms]
                        change: [+11.550% +11.750% +11.918%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
  3 (3.00%) high mild
  5 (5.00%) high severe

```
@sd2k sd2k force-pushed the stl-rs-released-compatibility branch from 2e73958 to a0c4bad Compare September 18, 2023 20:30
@sd2k

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

stlrs will have its own implementation of MSTL in v0.3.0 which means
less for this crate to maintain. Benchmarks show it runs pretty much
identically to the augurs implementation which is nice. The only
downside is the f64 -> f32 conversion required before calling the stlrs
APIs but that would be required anyway if we want to avoid any forks.
@sd2k sd2k changed the title Accommodate restrictions of released stl-rs Use upstream stlrs crate Sep 23, 2023
@sd2k sd2k changed the title Use upstream stlrs crate Use upstream stlrs crate Sep 23, 2023
@sd2k sd2k enabled auto-merge (squash) September 25, 2023 07:59
@sd2k sd2k merged commit ebd49a0 into main Sep 25, 2023
15 checks passed
@sd2k sd2k deleted the stl-rs-released-compatibility branch September 25, 2023 08:01
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