-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70469/
-----------------------------------------------------------

(Updated April 16, 2019, 9:39 a.m.)


Review request for mesos and Benjamin Mahler.


Changes
-------

Updated benchmark result.


Bugs: MESOS-9723
    https://issues.apache.org/jira/browse/MESOS-9723


Repository: mesos


Description
-------

This patch optimizes the permutation step of the weighted
shuffling function used by the random sorter.
The permutation step now has constant memory cost and
O(n) time complexity.

This is based on the algorithm described in:
https://s.apache.org/o7K0

Also added a unit test.


Diffs
-----

  src/master/allocator/sorter/random/utils.hpp 
1329359040082ed128d8dbc45381aa3e529224e4 
  src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 


Diff: https://reviews.apache.org/r/70469/diff/1/


Testing (updated)
-------

make check

Ran a modified sorter benchmark:

Before: 100000 runs of sort of 2000 clients took 9.113634ms
After: 100000 runs of sort of 2000 clients took 8.802126ms

It appears to have minimal performance improvement.


Thanks,

Meng Zhu

Reply via email to