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

Add benchmarks and Cargo profile using link-time optimization #89

Merged
merged 7 commits into from
Dec 15, 2022
Merged

Conversation

g-bauer
Copy link
Contributor

@g-bauer g-bauer commented Dec 13, 2022

This PR adds

  • A Cargo profile including LTO
  • Two groups of benchmarks:
    • dual_numbers provides evaluations of the Helmholtz energy function for different dual number types without constructing a State object.
    • state_properties provides benchmarks for different properties (compressibility, molar_volumes, fugacity coefficient, and isochoric heat capacity for now). The State is constructed within the function that is evaluated for the benchmarks but conditions are given in the natural variables of the Helmholtz energy so that no density iteration has to be conducted.
  • A readme for the benchmarks

This PR changes the Cargo profile of the workflow we use to build and publish python wheels to include LTO.

In the future, it might be interesting to also investigate the different contributions for PC-SAFT separately or add additional benchmarks for different pure substances and mixtures.

@g-bauer g-bauer requested a review from prehner December 13, 2022 17:34
Copy link
Contributor

@prehner prehner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exciting update. More performance with only compile times as downside! I have some suggestions to reduce boilerplate in the benchmarks.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
benches/dual_numbers.rs Show resolved Hide resolved
benches/dual_numbers.rs Outdated Show resolved Hide resolved
benches/state_properties.rs Outdated Show resolved Hide resolved
benches/state_properties.rs Outdated Show resolved Hide resolved
benches/state_properties.rs Outdated Show resolved Hide resolved
benches/state_properties.rs Outdated Show resolved Hide resolved
g-bauer and others added 2 commits December 14, 2022 12:25
… typos.

Co-authored-by: Philipp Rehner <69816385+prehner@users.noreply.github.com>
@g-bauer g-bauer merged commit 2d821f3 into main Dec 15, 2022
@g-bauer g-bauer deleted the benches branch December 15, 2022 10:08
@g-bauer g-bauer mentioned this pull request Dec 15, 2022
14 tasks
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.

2 participants