git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 7bd099d) | patch
Improve implementation of GEQO's init_tour() function.
Thu, 5 Nov 2015 15:46:14 +0000 (10:46 -0500)
Thu, 5 Nov 2015 15:46:14 +0000 (10:46 -0500)
commit 59464bd6f928ad0da30502cbe9b54baec9ca2c69
Improve implementation of GEQO's init_tour() function.

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
src/backend/optimizer/geqo/geqo_recombination.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /