equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
109 stars 56 forks source link

CLN: Enhance pybind setup & move some more functions to C++ #1139

Closed mferrera closed 6 months ago

mferrera commented 6 months ago

No particular fixation with the bulkvol function, just have to start somewhere and this was a good spot. But the main focus of this PR is to expand the pybind11 setup into something more scalable. This format will probably change later, too. Minor performance improvement.

Resolves #1137 Adds to #1138

Old:

New:

Taking the medians at face value, in sum these changes made the function 30% faster from where it started with the SWIG C binding.

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0af8d2f) 80.28% compared to head (16df165) 80.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1139 +/- ## ========================================== + Coverage 80.28% 80.30% +0.02% ========================================== Files 97 97 Lines 13571 13560 -11 Branches 2177 2174 -3 ========================================== - Hits 10895 10890 -5 + Misses 1954 1950 -4 + Partials 722 720 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.