Skip to content

Commit 7a56cf9

Browse files
committed
various updates
1 parent 15c0732 commit 7a56cf9

File tree

2 files changed

+205
-164
lines changed

2 files changed

+205
-164
lines changed

bench.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#include <stdio.h>
55
#include <iostream>
66
#include <sstream>
7-
#define BENCH_SIZE ( (1024) )
8-
#define ROUNDS 40*64*512
7+
#define BENCH_SIZE ( (1024*16*2) )
8+
#define ROUNDS 3000
99

1010
/* SEQUENTIAL BENCH
1111
int main( int argc, char** argv )
@@ -48,12 +48,12 @@ void pc_bench_worker( int pro, int con, char* (*do_alloc)(int s), void (*do_free
4848

4949
for( int r = 0; r < ROUNDS; ++r )
5050
{
51-
for( size_t x = 0; x < 4*4 ; ++x )
51+
for( size_t x = 0; x < BENCH_SIZE/4 ; ++x )
5252
{
5353
uint32_t p = rand() % buffers[pro].size();
5454
if( !buffers[pro][p] )
5555
{
56-
uint64_t si = 32;// +rand()%(1024); //4000;//32 + rand() % (1<<16);
56+
uint64_t si = 10000;//16 +rand()%(1024); //4000;//32 + rand() % (1<<16);
5757
total_alloc += si;
5858
int64_t* r = (int64_t*)do_alloc( si );
5959
// block_header* bh = ((block_header*)r)-1;
@@ -68,7 +68,7 @@ void pc_bench_worker( int pro, int con, char* (*do_alloc)(int s), void (*do_free
6868
buffers[pro][p] = r;
6969
}
7070
}
71-
for( size_t x = 0; x < 4*4 ; ++x )
71+
for( size_t x = 0; x < BENCH_SIZE/4 ; ++x )
7272
{
7373
uint32_t p = rand() % buffers[con].size();
7474
assert( p < buffers[con].size() );

0 commit comments

Comments
 (0)