mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
micro-optimization in tactics' cleanup(): avoid dealloc+alloc traffic
This commit is contained in:
parent
632c2d8ebf
commit
000796c25c
|
@ -307,9 +307,8 @@ public:
|
|||
|
||||
virtual void cleanup() {
|
||||
ast_manager & m = m_imp->m;
|
||||
imp * d = alloc(imp, m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
m_imp->~imp();
|
||||
m_imp = new (m_imp) imp(m, m_params);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -171,9 +171,8 @@ public:
|
|||
|
||||
virtual void cleanup() {
|
||||
ast_manager & m = m_imp->m;
|
||||
imp * d = alloc(imp, m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
m_imp->~imp();
|
||||
m_imp = new (m_imp) imp(m, m_params);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -502,9 +502,8 @@ void reduce_args_tactic::operator()(goal_ref const & g,
|
|||
}
|
||||
|
||||
void reduce_args_tactic::cleanup() {
|
||||
ast_manager & m = m_imp->m();
|
||||
imp * d = alloc(imp, m);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
ast_manager & m = m_imp->m();
|
||||
m_imp->~imp();
|
||||
m_imp = new (m_imp) imp(m);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue