1
0
Fork 0

Code optimizations: Avoiding counting repeatedly

pull/1168/head
Jordi Boggiano 2012-10-14 16:57:44 +02:00
parent beb9a5bd72
commit 6a03e4f9ac
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ class Solver
{
$decisionStart = count($this->decisions) - 1;
for ($ruleIndex = 0; $ruleIndex < count($this->rules); $ruleIndex++) {
$rulesCount = count($this->rules);
for ($ruleIndex = 0; $ruleIndex < $rulesCount; $ruleIndex++) {
$rule = $this->rules->ruleById($ruleIndex);
if (!$rule->isAssertion() || $rule->isDisabled()) {