cb-geo / mpm

CB-Geo High-Performance Material Point Method
https://www.cb-geo.com/research/mpm
Other
243 stars 83 forks source link

:rocket: Adding noexcept to improve performance #547

Closed kks32 closed 4 years ago

kks32 commented 4 years ago

The code shouldn't throw, unless the exception can be handled. If not, this should be checked by assert and not a throw. The standard library is changing how to do logic and runtime errors, and this improves performance and aligns us to use Contracts when it's available in c++20.

codecov[bot] commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@2489a72). Click here to learn what that means. The diff coverage is 99.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #547   +/-   ##
==========================================
  Coverage           ?   96.68%           
==========================================
  Files              ?      106           
  Lines              ?    21604           
  Branches           ?        0           
==========================================
  Hits               ?    20886           
  Misses             ?      718           
  Partials           ?        0
Impacted Files Coverage Δ
include/particle_base.h 100% <ø> (ø)
include/node_base.h 100% <ø> (ø)
include/node.h 100% <ø> (ø)
include/particle.h 100% <100%> (ø)
tests/mesh_test.cc 99.1% <100%> (ø)
include/node.tcc 95.29% <100%> (ø)
tests/node_test.cc 99.78% <100%> (ø)
tests/particle_test.cc 99.87% <100%> (ø)
include/particle.tcc 93.78% <97.22%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2489a72...6323e94. Read the comment docs.

cbgeo commented 4 years ago

Improves performance by 13%

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.