Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2808

Optimize subList reversal

    XMLWordPrintable

Details

    • Story
    • Resolution: Done
    • Minor
    • 8.33.0.Final
    • None
    • optaplanner-core
    • None

    Description

      There are three hotpath places (SubChain, SubList*Move) that need to build a reversed copy of an input list without affecting the input. It's currently done like this:

      List<Object> reversedCopy = new ArrayList<>(inputList);
      Collections.reverse(reversedCopy);
      

      This has a potential to be optimized and impact score calculation speed. The new algorithm should be primarily optimized for small lists (vehicles can hardly visit hundreds of customers in one tour).

      Attachments

        Activity

          People

            lpetrovi@redhat.com Lukáš Petrovický (Inactive)
            jlocker Jiří Locker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: