diff options
author | Tony Cook <tony@develop-help.com> | 2016-05-18 15:03:14 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2017-09-11 10:59:42 +1000 |
commit | f26b33bdaa1e41fbaf65c649a3208f081fa7571b (patch) | |
tree | 08ebd8b38bf725af3bd0a77465a1916229812aaf /pp_sort.c | |
parent | 3ff4feb5bd226622062600b4127bb8c276c9d5ec (diff) | |
download | perl-f26b33bdaa1e41fbaf65c649a3208f081fa7571b.tar.gz |
(perl #127663) create a separate random source for internal use
and use it to initialize hash randomization and to innoculate against
quadratic behaviour in pp_sort
Diffstat (limited to 'pp_sort.c')
-rw-r--r-- | pp_sort.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -788,7 +788,7 @@ S_qsortsvu(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t compare) size_t n; SV ** const q = array; for (n = num_elts; n > 1; ) { - const size_t j = (size_t)(n-- * Drand01()); + const size_t j = (size_t)(n-- * Perl_internal_drand48()); temp = q[j]; q[j] = q[n]; q[n] = temp; |