feos icon indicating copy to clipboard operation
feos copied to clipboard

Add benchmarks

Open g-bauer opened this issue 3 years ago • 2 comments

Following #65, we should add benchmarks for possible future performance investigations. Feel free to add to the list of functions to benchmark.

  • [x] direct calls to the residual Helmholtz energy function given a StateHD (circumventing closure construction and cache) [#89 ].
    • [x] Helmholtz energy
    • [x] first derivative using Dual64
    • [x] second derivative using HyperDual64
    • [x] third derivative using Dual3
  • [x] Properties of State (creating a State inside benchmark or manually clearing cache) [#89]
  • [x] functions including algorithms / solver
    • [x] PhaseEquilibrium: constructors
    • [x] critical point
  • [ ] DFT
    • [ ] surface tension
    • [x] pores
  • [ ] Python
    • [ ] identifying overhead

Notes

  • Compare impact of compiler options
    • lto = "thin" versus lto = true
    • target-cpu=native
    • and more?

g-bauer avatar Nov 15 '22 12:11 g-bauer

I added DFT benchmarks in #103. Comparing different solvers in a benchmark is not useful imo, because it gives a very limited insight into the capabilities of the solver.

Do you have a specific thought on how to identify Python overhead? For DFT it appears to be of the order of 2-3 ms, but very difficult to assess property.

prehner avatar Dec 29 '22 14:12 prehner

Do you have a specific thought on how to identify Python overhead? For DFT it appears to be of the order of 2-3 ms

I am note sure. There are options to run Python code using pyo3 (run, eval, from_code, etc.) but I am not sure if we can use these to make proper comparisons or get an idea of the overhead of a function/method. 2-3 ms seems to be a lot, though. Does that include calling a property that returns a numpy array?

g-bauer avatar Jan 02 '23 12:01 g-bauer