choderalab / bayesian-itc

Python tools for the analysis and modeling of isothermal titration calorimetry (ITC) experiments.
GNU General Public License v3.0
5 stars 10 forks source link

Solve the ODE in cython #56

Closed bas-rustenburg closed 7 years ago

bas-rustenburg commented 9 years ago

This is not much faster at the moment. Opening this PR to share my progress.

All the numpy arrays make use of the python interpreter. I might be able to gain some speedup if I replace them by C arrays.

See here for some details on why it is slow. Yellow means calling it is calling the python interpreter. You can click to see the C code underneath. https://rawgit.com/bas-rustenburg/bayesian-itc/cython/bitc/heats.html

bas-rustenburg commented 9 years ago

Looping in @pgrinaway, he has some cython experience.

pgrinaway commented 9 years ago

One thing that might let you avoid memory allocation manually but still get full C is to return the output via a parameter reference (then you can allocate the array elsewhere and the hot loop can be just C).

I can take a stab at this tomorrow morning if you want.

bas-rustenburg commented 7 years ago

This didn't end up being very helpful, and I think we've found other ways of solving the problem computationally.