diff --git a/benchmark/make.sh b/benchmark/make.sh index c15726c22fd7a9840d2f95f7f0a3ae5c1b217de2..24fbce541f015337fd29ff69d5185d8ecd26f0d9 100755 --- a/benchmark/make.sh +++ b/benchmark/make.sh @@ -933,6 +933,40 @@ plot_initm_map_iter () { -output $graphics } + +# ------------------ + +run_pushm_iter_simple () { + benchmark=listk + make src/$benchmark + run_prologue + result="pushm_iter_simple.out" + export OCAMLRUNPARAM=l=8000 + prun -prog $prog \ + -scenario pushm_iter \ + -n $TWO_EXP_25 \ + -length 16,32,64,256,$TWO_EXP_10,$TWO_EXP_15,$TWO_EXP_18,$TWO_EXP_20,$TWO_EXP_22,$TWO_EXP_24 \ + -k 1,2 \ + -output $result \ + -runs 3 +} + +plot_pushm_iter_simple () { + #result="$1" + # graphics="$2" + result="pushm_iter_simple.out" + graphics="pushm_iter_simple.pdf" + series="$3" + echo $graphics > $home/.graphics + pplot scatter \ + --yzero --xlog -x length -y exectime \ + -legend-pos topleft \ + -series ${series}k \ + -input $result \ + -output $graphics +} + + # ------------------ run_pushm_iter () { diff --git a/benchmark/src/listk/Main.ml b/benchmark/src/listk/Main.ml index 401d6affb5c68e11e3cc6531b56930aad10171dc..ecde20b5c2341e00da0f623d4a394a58e86f018c 100644 --- a/benchmark/src/listk/Main.ml +++ b/benchmark/src/listk/Main.ml @@ -273,20 +273,17 @@ let list1_ref_push s x0 = let list2_ref_push s x0 = s := match !s with - | Nil -> Cons1(x0,Nil) | Cons1(x1,t) -> Cons2(x0,x1,t) | _ as t -> Cons1(x0,t) let list4_ref_push s x0 = s := match !s with - | Nil -> Cons1(x0,Nil) | Cons1(x1,Cons2(x2,x3,t)) -> Cons4(x0,x1,x2,x3,t) | Cons1(x1,t) -> Cons2(x0,x1,t) | _ as t -> Cons1(x0,t) let list8_ref_push s x0 = s := match !s with - | Nil -> Cons1(x0,Nil) | Cons1(x1,Cons2(x2,x3,Cons4(x4,x5,x6,x7,t))) -> Cons8(x0,x1,x2,x3,x4,x5,x6,x7,t) | Cons1(x1,Cons2(x2,x3,t)) -> Cons4(x0,x1,x2,x3,t) | Cons1(x1,t) -> Cons2(x0,x1,t) @@ -294,7 +291,6 @@ let list8_ref_push s x0 = let list16_ref_push s x0 = s := match !s with - | Nil -> Cons1(x0,Nil) | Cons1(x1,Cons2(x2,x3,Cons4(x4,x5,x6,x7, Cons8(x8,x9,x10,x11,x12,x13,x14,x15,t)))) -> Cons16(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,t)