I am using JaCoP inside the FRODO solver with (very) large ExtensionalSupportSTR constraints, and profiling the code has revealed that JaCoP spends most of its time inside ExtensionalSupportSTR.remove(), converting Integer's to raw int's and vice versa. This is because the constraint is using timestamps of type TimeStamp<Integer>, but it treats the return of TimeStamp.value() as an int instead of as an Integer, and passes raw int's instead of Integer's to TimeStamp.update(). I have noticed that the overwhelming majority of the constraints in JaCoP do the same.
Wouldn't it be more efficient to instead use timestamps over raw int's?
I am bit suprised to see that this design choice is causing so much performance degradation for your problem.
Can you send us some example where this translation from Integer to int, and back causes performance problems.
We will add it to our test suite as well as use it to compare to a new solution using raw ints to see if the performance improvement justifies adding a new class that uses just raw ints and rewritting existing constraints to use this new functionality when possible.
Thank your for reporting it.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.