pico-optimize contains(Object) methods

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: None
    • Component/s: core-libs
    • b31
    • generic
    • generic

        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/

              Assignee:
              Martin Buchholz
              Reporter:
              Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: