• Simon Zünd's avatar
    Reland "[array] Use random middle element to determine pivot during sorting" · 3896cdc2
    Simon Zünd authored
    This is a reland of 91bab558
    
    This CL contains two major changes w.r.t to the original CL:
    
    The random state is removed from the Smi root list and we pre-seed the RNG
    on each sort with the length of the array.
    
    To cut down on the length of the arguments list and to keep track of the
    random state across recursive calls, we move most of the sort arguments into
    a FixedArray and reload from the array for each recursion.
    
    Original change's description:
    > [array] Use random middle element to determine pivot during sorting
    >
    > This CL adds a "random state" to the Smi Root list and implements a
    > basic Linear congruential pseudo random number generator in Torque.
    >
    > The RNG is used to determine the pivot element for sorting. This will
    > prevent the worst cases for certain data layouts.
    >
    > Drive-by-fix: Make sorting of ranges and execution pauses for profviz
    > deterministic by adding a secondary sorting criteria.
    >
    > Bug: v8:7382
    > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
    > Change-Id: Ieb871e98e74bdb803f821b0cd35d2f67ee0f2868
    > Reviewed-on: https://chromium-review.googlesource.com/1082193
    > Reviewed-by: Hannes Payer <hpayer@chromium.org>
    > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    > Commit-Queue: Simon Zünd <szuend@google.com>
    > Cr-Commit-Position: refs/heads/master@{#53524}
    
    Bug: v8:7382
    Change-Id: Ia7bef7ed1c0e904ffe43bc428e702f64f9c6a60b
    Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
    Reviewed-on: https://chromium-review.googlesource.com/1087888Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Commit-Queue: Simon Zünd <szuend@google.com>
    Cr-Commit-Position: refs/heads/master@{#53583}
    3896cdc2
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...