Commit 229adcc6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4c89a1db
......@@ -10,8 +10,8 @@ $(XDAT) :
bench : bench_c bench_go
bench_copy: t_copy_c t_copy_go
./t_copy_c >t_copy_c.csv
./t_copy_go >t_copy_go.csv
./t_copy_c >t_copy_c.csv
bench_c : t_syspread_c $(XDAT) t_copy_c
./t_syspread_c $(XDAT) >t_syspread_c.csv
......
......@@ -22,9 +22,9 @@ double microtime() {
}
// 12345678
#define NITER 1000000
#define NITER 10000000
#define BUFSIZE 1024*1024
#define BUFSIZE 4*1024*1024
static char buf[BUFSIZE];
static char buf2[BUFSIZE];
......@@ -53,14 +53,14 @@ int main() {
printf("%ld\t%.1f\n", size, (Tend - Tstart) / niter / 1E-9);
size += 128;
//if (size < 4*1024) {
// size += 128; // detailed start
//} else if (size < 32*1024) {
// size += 256;
//} else {
// size += 512;
//}
if (size < 256) {
size += 1; // detailed start
} else if (size < 32*1024) {
size += 128;
} else if (size < 1024*1024) {
size += 512;
} else {
size += 1024;
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,9 +6,9 @@ import (
)
// 12345678
const Niter = 1000000
const Niter = 10000000
const BufSize = 1024*1024
const BufSize = 4*1024*1024
var buf [BufSize]byte
var buf2 [BufSize]byte
......@@ -36,15 +36,15 @@ func main() {
fmt.Printf("%v\t%.1f\n", size, float64(Tend.Sub(Tstart).Nanoseconds()) / float64(niter))
size += 128
//switch {
//case size < 4*1024:
// size += 128 // detailed start
//case size < 32*1024:
// size += 256
//default:
// size += 512
//}
switch {
case size < 256:
size += 1 // detailed start
case size < 32*1024:
size += 128
case size < 1024*1024:
size += 512
default:
size += 1024
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment