• Tom Lane's avatar
    Improve implementation of GEQO's init_tour() function. · 59464bd6
    Tom Lane authored
    Rather than filling a temporary array and then copying values to the
    output array, we can generate the required random permutation in-place
    using the Fisher-Yates shuffle algorithm.  This is shorter as well as
    more efficient than before.  It's pretty unlikely that anyone would
    notice a speed improvement, but shorter code is better.
    
    Nathan Wagner, edited a bit by me
    59464bd6
geqo_recombination.c 2.17 KB