mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
comment
This commit is contained in:
parent
592b421f44
commit
8835b95719
@ -760,6 +760,9 @@ pair<LPResult, map<string, rational>> LPSolver::check(SolvingState _state)
|
||||
|
||||
LPResult lpResult;
|
||||
vector<rational> solution;
|
||||
// TODO this actually compares including the variable names.
|
||||
// If we only compare based on coefficients, we will get way more cache hits.
|
||||
// The downside is that we need to adjust the model.
|
||||
auto it = m_cache.find(split);
|
||||
if (it != m_cache.end())
|
||||
tie(lpResult, solution) = it->second;
|
||||
|
@ -161,6 +161,8 @@ public:
|
||||
|
||||
private:
|
||||
// TODO check if the model is requested in production. If not, we do not need to cache it.
|
||||
// TODO This cache is inefficient because it compares including the variable names.
|
||||
// See comment in LPSolver::check for details.
|
||||
std::map<SolvingState, std::pair<LPResult, std::vector<boost::rational<bigint>>>> m_cache;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user