Seamless integration of LongVar (64-bit integer) #834
Replies: 3 comments
-
As a first step, which does not fit entirely the need, I propose to add the following API to
which automatically deal with |
Beta Was this translation helpful? Give feedback.
-
There might be some radical changes about the way Java handles primitives, which should include generics over primitives: https://www.levi9.com/articles/10-ways-java-is-getting-better/#anchor-7 https://openjdk.org/projects/valhalla/ I think that we should stay tuned about this :-) |
Beta Was this translation helpful? Give feedback.
-
This argues for upgrading the JDK to a new one |
Beta Was this translation helpful? Give feedback.
-
I believe that integer variables, based on 32-bits integers, are suited for most usages of choco-solver. Operations on 32-bits integers are also apparently faster in Java. However, I know from a recent experience that 64-bit long variables could also be helpful in some situations.
Ideally, having a LongVar extending IntVar for such particular cases would be perfect. However, this involves some design challenges:
In summary, I think that if we can implement this feature as a pure extension, without impacting propagators implementation nor solver performances would be a great asset for choco-solver.
If judged interesting by the community, I am ok to get involved in this work.
Beta Was this translation helpful? Give feedback.
All reactions