-
Notifications
You must be signed in to change notification settings - Fork 153
Performance improvement in PropXPlusYEqZ #1178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Do you observe any performance improvement ? |
|
For PropAbsolute, using removeInterval instead of removeValue enables to double the nb nodes per second |
| for (int v = -val; v <= val; v = Y.nextValue(v)) { | ||
| Y.removeValue(v, this, lcg() ? Reason.r(X.getValLit()) : Reason.undef()); | ||
| if (val >= 0) { | ||
| Y.removeInterval(-val, val, lcg() ? Reason.r(X.getValLit()) : Reason.undef()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removeInterval is not compatible with lcg.
| for (int v = 1 - min; v <= min - 1; v = Y.nextValue(v)) { | ||
| Y.removeValue(v, this, lcg() ? Reason.r(X.getMinLit()) : Reason.undef()); | ||
| if (1 - min <= min -1) { | ||
| Y.removeInterval(1 - min, min - 1, lcg() ? Reason.r(X.getMinLit()) : Reason.undef()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
We should either accept not to use removeInterval or use it only when LCg is disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think calling System.gc() is useless.
Did you see any differences ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just hoping it would be sufficient to solve the out of memory error in the github instance (it wasn't).
| X.instantiateTo(Math.abs(Y.getValue()), this, lcg() ? Reason.r(Y.getValLit()) : Reason.undef()); | ||
| setPassive(); | ||
| } else if (Y.hasEnumeratedDomain()) { | ||
| } else if (Y.hasUnfixedEnumeratedDomain()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition seems correct but I think a little comment would help here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will move back to the original condition actually
No description provided.