mirror of
https://github.com/Z3Prover/z3
synced 2026-06-19 15:16:29 +00:00
perf
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f261c7732b
commit
e011aead11
1 changed files with 4 additions and 2 deletions
|
|
@ -57,6 +57,7 @@ namespace seq {
|
|||
|
||||
// Reset only operation caches (union/inter/concat/complement)
|
||||
// while preserving derivative caches (m_cache, m_top_cache)
|
||||
// The op cache does index on m_ele so it has to be reset if m_ele changes.
|
||||
void derive::reset_op_caches() {
|
||||
m_union_cache.reset();
|
||||
m_inter_cache.reset();
|
||||
|
|
@ -81,8 +82,9 @@ namespace seq {
|
|||
result = cached;
|
||||
return result;
|
||||
}
|
||||
// Cache and pin the final result
|
||||
// Pin ele and r
|
||||
m_trail.push_back(ele);
|
||||
m_trail.push_back(r);
|
||||
|
||||
// Always compute the SYMBOLIC derivative wrt the canonical
|
||||
// variable v (so the cached result is reusable for any
|
||||
|
|
@ -100,7 +102,7 @@ namespace seq {
|
|||
result = derive_rec(r);
|
||||
m_top_cache.insert(ele, r, result);
|
||||
|
||||
m_trail.push_back(r);
|
||||
// pin the final result
|
||||
m_trail.push_back(result);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue