Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-3938

Optimize autoboxing in ReplayPosition.comparator

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Not A Problem
    • None
    • None

    Description

      ReplayPosition.comparator does some unnecessary boxing (and auto-boxing) from primitive int and long to Integer and Long, just to perform a basic numeric comparison. We can just inline the comparison and avoid the conversion to Integer/Long instances. The ReplayPosition.equals() simple looks at the primitive values, so this change would just make the code more parallel.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jasobrown Jason Brown
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: