Skip to content

Commit

Permalink
Use size * 4 instead of a fixed interval. This may speed things up
Browse files Browse the repository at this point in the history
for smaller block sizes.
  • Loading branch information
dag-erling committed Aug 13, 2010
1 parent 524ef70 commit 450e93e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions phybs.c
Expand Up @@ -41,7 +41,6 @@

static unsigned int minsize = 1024;
static unsigned int maxsize = 8192;
#define STEP (maxsize * 4)
static unsigned int total = (128 * 1024 * 1024);

static int opt_r = 0;
Expand Down Expand Up @@ -166,9 +165,9 @@ main(int argc, char *argv[])
"msec", "tps", "kBps");
for (size_t size = minsize; size <= maxsize; size *= 2) {
printf("\n");
scan(fd, size, 0, STEP, total / size);
scan(fd, size, 0, size * 4, total / size);
for (off_t offset = BSIZE; offset < (off_t)size; offset *= 2)
scan(fd, size, offset, STEP, total / size);
scan(fd, size, offset, size * 4, total / size);
}
close(fd);
exit(0);
Expand Down

0 comments on commit 450e93e

Please sign in to comment.