From 5dc54bb7d24e30aef91fb973b65294386953610d Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Thu, 17 Sep 2020 17:42:32 +0200 Subject: [PATCH] Optimize recursive constant dependency --- src/compiler.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/compiler.js b/src/compiler.js index b9c3d0f..69e2dfd 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -346,17 +346,24 @@ async function reduceConstrains(ctx) { } else { nextPossibleConstraints = {}; } - removedSignals = new BigArray(); + removedSignals = {}; nRemoved = 0; - lIdx = new BigArray(); + lIdx = {}; for (let i=0;i100000) { + nextPossibleConstraints[possibleConstraints[i]] = true; + continue; + } + // Swap a and b if b has more variables. if (Object.keys(c.b).length > Object.keys(c.a).length) { const aux = c.a; @@ -434,7 +441,7 @@ async function reduceConstrains(ctx) { } } - const removedSignalsList = removedSignals.getKeys(); + const removedSignalsList = Object.keys(removedSignals); for (let i=0; i