CPP: Performance improvement.

This commit is contained in:
Geoffrey White
2019-11-04 15:16:58 +00:00
parent 695d4ff511
commit ed87f25886

View File

@@ -844,14 +844,10 @@ class FormatLiteral extends Literal {
*/
int getFormatArgumentIndexFor(int n, int mode) {
hasFormatArgumentIndexFor(n, mode) and
result = count(int n2, int mode2 |
hasFormatArgumentIndexFor(n2, mode2) and
(
n2 < n
or
n2 = n and
mode2 < mode
)
(3 * n) + mode = rank[result + 1](int n2, int mode2 |
hasFormatArgumentIndexFor(n2, mode2)
|
(3 * n2) + mode2
)
}