Browse Source

High Removed array

master
Jordi Baylina 3 years ago
parent
commit
f9f1d0c13e
No known key found for this signature in database GPG Key ID: 7480C80C1BE43112
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      src/compiler.js

+ 6
- 2
src/compiler.js

@ -340,6 +340,7 @@ async function reduceConstrains(ctx) {
possibleConstraints[i] = ctx.constraints.length - i -1;
}
let totalRemoved = 0;
while (possibleConstraints.length >0) {
if (possibleConstraints.length>1<<20) {
nextPossibleConstraints = new BigArray();
@ -359,7 +360,7 @@ async function reduceConstrains(ctx) {
if (!c) continue;
// Limit of number of lelements removed per step
if (nRemoved>500000) {
if (nRemoved>5000000) {
nextPossibleConstraints[possibleConstraints[i]] = true;
continue;
}
@ -409,7 +410,7 @@ async function reduceConstrains(ctx) {
const cts = Object.keys(sig2constraint[isolatedSignal]);
for (let k=0; k<cts.length; k++) {
nextPossibleConstraints[cts[k]] = true;
if (ctx.constraints[cts[k]]) nextPossibleConstraints[cts[k]] = true;
}
}
}
@ -464,6 +465,9 @@ async function reduceConstrains(ctx) {
}
*/
possibleConstraints = nextPossibleConstraints;
totalRemoved += nRemoved;
if (ctx.verbose) console.log(`Removed: ${totalRemoved} TotalConstraints: ${ctx.constraints.length}` );
}

Loading…
Cancel
Save