Changeset 75965a6 for benchmark


Ignore:
Timestamp:
Jan 13, 2022, 9:49:46 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
86530e7
Parents:
5d1ebb9
Message:

replace thread_rand with prng, replace xorshift64 with xorshift_13_7_17

Location:
benchmark/readyQ
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/churn.cfa

    r5d1ebb9 r75965a6  
    2121        wait( sem );
    2222        for() {
    23                 uint64_t r = thread_rand();
     23                uint32_t r = prng();
    2424                bench_sem * next = __atomic_exchange_n(&spots[r % spot_cnt], &sem, __ATOMIC_SEQ_CST);
    2525                if(next) post( *next );
  • benchmark/readyQ/locality.cfa

    r5d1ebb9 r75965a6  
    128128__attribute__((noinline)) void work(MyData & data, size_t cnt_, uint64_t & state) {
    129129        for (cnt_) {
    130                 access(data, __xorshift64(state));
     130                access(data, xorshift_13_7_17(state));
    131131        }
    132132}
    133133
    134134void main(MyThread & this) {
    135         uint64_t state = thread_rand();
     135        uint64_t state = prng();
    136136
    137137        // Wait for start
     
    144144
    145145                // Wait on a random spot
    146                 uint64_t idx = __xorshift64(state) % this.spots.len;
     146                uint64_t idx = xorshift_13_7_17(state) % this.spots.len;
    147147                bool closed = put(*this.spots.ptr[idx], this, this.data, this.share);
    148148
Note: See TracChangeset for help on using the changeset viewer.