-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b31
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085011 | emb-9 | Martin Buchholz | P3 | Resolved | Fixed | team |
The idiom
return index >= 0
is one byte shorter than
return index != -1
for collection contains(Object) methods
In the core libraries, even such small optimizations should not go undone, especially when it makes the core library source code more consistent.
http://cr.openjdk.java.net/~martin/webrevs/openjdk9/pico-optimize-contains/
return index >= 0
is one byte shorter than
return index != -1
for collection contains(Object) methods
In the core libraries, even such small optimizations should not go undone, especially when it makes the core library source code more consistent.
http://cr.openjdk.java.net/~martin/webrevs/openjdk9/pico-optimize-contains/
- backported by
-
JDK-8085011 pico-optimize contains(Object) methods
-
- Resolved
-