perf(GraphEngine): using caching clawed back ~10% performance

This commit is contained in:
2025-12-06 12:10:43 -05:00
parent b6f452e74c
commit 4e2b3cb11f
4 changed files with 30 additions and 7 deletions

View File

@@ -809,6 +809,8 @@ namespace gridfire::reaction {
std::vector<RateCoefficientSet> m_rates; ///< List of rate coefficient sets from each source.
bool m_weak = false;
mutable std::unordered_map<double, double> m_cached_rates;
private:
/**
* @brief Template implementation for calculating the total reaction rate.