KingsburyLab / pyEQL

A Python library for solution chemistry
Other
66 stars 20 forks source link

Performance Improvements #72

Closed rkingsbury closed 1 year ago

rkingsbury commented 1 year ago

Summary

Miscellaneous changes to improve pyEQL's speed. Reduces the time required for many common operations by 3x - 10x.

Major changes:

Results (results of %%timeit (ms), before / after)

  1. Instantiate a 2 mol/L NaCl Solution: 301 / 84
  2. s.get_activity_coefficient('Na+'): 27 / 14
  3. s.conductivity: 143 / 44
  4. s.ionic_strength: 5 / 0.5
  5. `s.get_transport_number('Na+'): 2.4 / 0.5
codecov[bot] commented 1 year ago

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/pyEQL/__init__.py 100.00% <100.00%> (ø)
src/pyEQL/engines.py 81.52% <100.00%> (ø)
src/pyEQL/utils.py 100.00% <100.00%> (ø)
src/pyEQL/equilibrium.py 50.00% <50.00%> (ø)
src/pyEQL/solution.py 83.12% <86.79%> (-0.28%) :arrow_down:

:loudspeaker: Thoughts on this report? Let us know!.