Summary: | [AutoRefactor immigration #63/151] [cleanup & saveaction] Use Double.compare() or Float.compare() | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Fabrice Tiercelin <fabrice.tiercelin> |
Component: | UI | Assignee: | Fabrice Tiercelin <fabrice.tiercelin> |
Status: | ASSIGNED --- | QA Contact: | Carsten Hammer <carsten.hammer> |
Severity: | enhancement | ||
Priority: | P3 | CC: | jarthana |
Version: | 4.18 | Keywords: | investigate |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/176243 | ||
Whiteboard: |
Description
Fabrice Tiercelin
2021-02-14 09:54:12 EST
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/176243 Can you tell me why we are doing this? Consider a simple example: if (Double.compare(constantValue, -0.0) == 0) The new code produces identical byte-code as the old one except that dcmpl is replaced by invokestatic. I can't think of a reason why we should be spending time on this. If anything, we are introducing more machine cycles. On one hand, we are trying to improve performance and then we have changes like these which is trying to prevent bugs in a code that's been around tens of hears even at a cost of a performance. I'm wondering myself. |