How much faster is Java 17?
Taking this opportunity to promote the author of this article (Geoffrey de Smet) and the project he&#x27;s been the lead of for some very long amount of time (Optaplanner):<p>If you&#x27;ve never heard of constraints programming -- it&#x27;s really interesting (personal opinion).<p>It lets you programmatically state &quot;rules&quot; and &quot;goals&quot; of some system, and solvers will automatically attempt to find the best solution.<p>Optaplanner is one of the most advanced of such engines that I&#x27;m aware of:<p><pre><code>  Under the hood, OptaPlanner combines sophisticated Artificial Intelligence optimization algorithms (such as Tabu Search, Simulated Annealing, Late Acceptance and other metaheuristics) with very efficient score calculation and other state-of-the-art constraint solving techniques.
</code></pre>
But it&#x27;s also really approachable since they re-wrote it in 2020 to accept regular code for rules, instead of the custom DSL language they used before (Drools).<p><a href="https:&#x2F;&#x2F;www.optaplanner.org&#x2F;blog&#x2F;2020&#x2F;04&#x2F;07&#x2F;ConstraintStreams.html" rel="nofollow">https:&#x2F;&#x2F;www.optaplanner.org&#x2F;blog&#x2F;2020&#x2F;04&#x2F;07&#x2F;ConstraintStream...</a><p>I got interested in this area some years ago, and reached out to Geoffrey personally. He took the time to reply to me and answer a few questions. Great person, he&#x27;s brilliant and super passionate about the domain.<p>If you have any sort of practical usecase for this (scheduling, vehicle routing, cost optimization, etc) and this sounds at all interesting, highly recommend giving it a shot!<p>As an example of what you can do in a few lines with this, here&#x27;s one from the docs:<p><pre><code>  The following code snippet first groups all processes by the computer they run on, sums up all the power required by the processes on that computer using the ConstraintCollectors.sum(… ) collector, and finally penalizes every computer whose processes consume more power than is available.

    private Constraint requiredCpuPowerTotal(ConstraintFactory constraintFactory) {
        return constraintFactory.from(CloudProcess.class)
                .groupBy(CloudProcess::getComputer, sum(CloudProcess::getRequiredCpuPower))
                .filter((computer, requiredCpuPower) -&gt; requiredCpuPower &gt; computer.getCpuPower())
                .penalize(&quot;requiredCpuPowerTotal&quot;,
                        HardSoftScore.ONE_HARD,
                        (computer, requiredCpuPower) -&gt; requiredCpuPower - computer.getCpuPower());
    }
</code></pre>
---<p>As a bonus, it&#x27;s natively integrated into Quarkus and the Quarkus ecosystem.
Quarkus is the best thing since sliced bread if you&#x27;re on the JVM and are writing API&#x27;s.<p><a href="https:&#x2F;&#x2F;docs.optaplanner.org&#x2F;latest&#x2F;optaplanner-docs&#x2F;html_single&#x2F;index.html#quarkusJavaQuickStart" rel="nofollow">https:&#x2F;&#x2F;docs.optaplanner.org&#x2F;latest&#x2F;optaplanner-docs&#x2F;html_si...</a>