'For the construction phase why is selectionOrder=RANDOM so much faster than the default option?

Given the configuration below why is it so much faster when selectionOrder = RANDOM (7s) than when the default is used i.e. selectionOrder commented out (20min). Also when is the RANDOM order applied? Once at the start or at every step?

<constructionHeuristic>
    <changeMoveSelector>
        <selectionOrder>RANDOM</selectionOrder>
        <selectedCountLimit>300</selectedCountLimit>
        <valueSelector variableName="user"/>
    </changeMoveSelector>
    <changeMoveSelector>
      <valueSelector variableName="startDate"/>
    </changeMoveSelector>

  </constructionHeuristic>


Solution 1:[1]

To answer your first question: RANDOM is so much faster, because it doesn't need to generate any sort of collection of items to iterate over. It simply generates a random item every time it is called. We do not need to know what comes before, or what comes after. If instead you want a curated selection with guarantees on repetition, we have to first enumerate all of the options. And that can take considerable amount of time. See selection order for details.

To answer your second and third question, please check out selector cache types.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1