Ignore:
Timestamp:
Dec 17, 2020, 2:42:33 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
aa1d13c
Parents:
8235415
Message:

Moved work out so it looks better in profiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/locality.go

    r8235415 r94d93510  
    8383}
    8484
     85func work(data * [] uint64, size uint64, cnt uint64, state * uint64) {
     86        for i := uint64(0); i < cnt; i++ {
     87                (*data)[__xorshift64(state) % size] += 1
     88        }
     89}
     90
    8591func local(result chan uint64, start chan struct{}, size uint64, cnt uint64, channels [] Spot, share bool, id int) {
    8692        state := rand.Uint64()
     
    99105        <- start
    100106        for true {
    101                 for i := uint64(0); i < cnt; i++ {
    102                         (*data)[__xorshift64(&state) % size] += 1
    103                 }
     107                work(data, size, cnt, &state)
    104108
    105109                i := __xorshift64(&state) % uint64(len(channels))
Note: See TracChangeset for help on using the changeset viewer.