aboutsummaryrefslogtreecommitdiff
path: root/elymas/lib
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2016-08-14 21:50:48 +0200
committerDrahflow <drahflow@gmx.de>2016-08-14 21:50:48 +0200
commitfc75bd874972eebad490dfc2b35121a54f234c2f (patch)
tree782771bdea22134a2667a87791709acbf2cbd1a8 /elymas/lib
parent9d977e0ff62e06c68d222ff7ea054d3116c8ac98 (diff)
Remove some (potential) source of O(n^2)
Diffstat (limited to 'elymas/lib')
-rw-r--r--elymas/lib/parser.ey9
1 files changed, 7 insertions, 2 deletions
diff --git a/elymas/lib/parser.ey b/elymas/lib/parser.ey
index 8cccee1..d5319d3 100644
--- a/elymas/lib/parser.ey
+++ b/elymas/lib/parser.ey
@@ -308,7 +308,7 @@
i 1 add results * {
i results * # collected outside the loop
}' {
- [ i results * ] waitingStates cat =waitingStates
+ [ waitingStates i results * ] =waitingStates
}' ? *
}' loop
} each ] _ =executingStates len
@@ -320,7 +320,12 @@
# "<<<---" dump
}' { }" loop
- waitingStates _ =states
+ [
+ { waitingStates len }" {
+ 1 waitingStates *
+ 0 waitingStates * =waitingStates
+ }" loop
+ ] _ =states
}' > --
} /run deffst
>