Hacker News new | ask | show | jobs
by sevensor 3067 days ago
Adding to my other comment, my biggest dissatisfaction with this article is that all it did was show the quite excessively verbose problem setup, without actually showing an algorithm for integer linear programming. An interesting post would have explained how to implement branch and bound in Kotlin, not how to call somebody else's library. Needless to say, I'm not sold on Kotlin from reading this.
2 comments

I would disagree with this. In general, the algorithms are well known and only need to be implemented once. Doing problem modeling to solve real problems is where the action is for optimization.
That's fine, but this article also didn't have any real-world examples in it.
> the algorithms are well known and only need to be implemented once

To an extent. The basic algorithms are well known (simplex, interior point), but there is a lot of scope for improvements - this is why the big commercial solvers can be orders of magnitude faster than the best open source ones. Still, even if the algorithms are not well-known, they do only need to be implemented once.

For integer programming, though, there can definitely be value in problem-specific heuristics for branch selection and rounding.

Also, I believe no one is doing linear programming without vectorized operations (SIMD) nowadays.

I know JVM optimizes small methods, so maybe their JIT optimizer does that automatically, but I'm not sure that optimizer is better that manually optimized code like in numpy.

I suspect you're right. Java doesn't have the best track-record when it comes to SIMD.

Unlike .Net with System.Numerics.Vectors, they're not even interested in making a platform-independent SIMD library for manual optimisation. The JVM holds contempt for such real-world optimisations. I see that Intel have made one though - https://software.intel.com/en-us/articles/vector-api-develop...

At a glance, it looks like Oracle have dabbled with AVX in HotSpot, but aren't taking it very seriously. https://www.google.com/search?q="-XX%3AUseAVX"

We see folks using our linalg library for this and deep learning: http://nd4j.org We maintain our own c++ and cuda stack underneath this as well. It also allow control of these native components from java. We implement everything from our own garbage collector for cpu and gpu to our own cuda kernels.
Also note that integer linear programming like in the article is very different in practice from continuous linear programming. Relaxing to a continuous problem often doesn't help much.