aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-14 11:54:54 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-14 11:54:54 -0800
commit483dbcb1d56cec092ee66f7dce2ae00eb01dbdfe (patch)
treeb89ee44a45d64bf6f00cc2d38ee14db027803c46
parent5152adf0333c96e88f0dd085514f182451309dfb (diff)
optimize relooper by not sorting and comparing stringifications; we can compare just sizes of allInLabels etc.
-rw-r--r--src/analyzer.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 6fd7ef66..354e9e03 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -956,8 +956,7 @@ function analyzer(data, sidePass) {
temp = temp.concat(labelsDict[label2Id][l]);
});
temp = dedup(temp);
- temp.sort();
- if (JSON.stringify(label[l]) != JSON.stringify(temp)) {
+ if (temp.length > label[l].length) {
label[l] = temp;
worked = true;
}