JDK-8137309 : Long/Integer.compareTo code generation could be improved
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • CPU: x86
  • Submitted: 2015-09-28
  • Updated: 2018-10-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Originally suggested by Ian Rogers here:
  http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2015-September/019112.html

Sample benchmarks (see the performance data and analysis inside):
 http://cr.openjdk.java.net/~shade/8137309/PredictedCompareTo.java
 http://cr.openjdk.java.net/~shade/8137309/BiasedCompareTo.java

Runnable JAR:
 http://cr.openjdk.java.net/~shade/8137309/benchmarks.jar
Comments
Vladimir Kozlov wrote in the email thread: "I agree with Vitaly. It is better to use pattern matching (and generate CmpI3 and CmpL3 nodes) in subnode.cpp because java code is very simple and we may match other cases too. Also suggested changes are not complete since CmpI3 implementation was not added to other platforms"
30-01-2017