Skip to content

Commit

Permalink
Merge pull request #15493 from ethereum/bodyCopierMicroOptimization
Browse files Browse the repository at this point in the history
Avoid multiple lookups during body-copying while inlining.
  • Loading branch information
cameel authored Oct 30, 2024
2 parents b5b8084 + c66905a commit 654ce6b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libyul/optimiser/FullInliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,5 @@ Statement BodyCopier::operator()(FunctionDefinition const&)

YulName BodyCopier::translateIdentifier(YulName _name)
{
if (m_variableReplacements.count(_name))
return m_variableReplacements.at(_name);
else
return _name;
return util::valueOrDefault(m_variableReplacements, _name, _name);
}

0 comments on commit 654ce6b

Please sign in to comment.