From 4f34dc852c94f36e972799cfe87257ed547af906 Mon Sep 17 00:00:00 2001 From: Aria Shrimpton Date: Tue, 19 Mar 2024 22:39:10 +0000 Subject: update tasks & analysis --- analysis/vis.livemd | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) (limited to 'analysis/vis.livemd') diff --git a/analysis/vis.livemd b/analysis/vis.livemd index 2fa59d2..3eead6f 100644 --- a/analysis/vis.livemd +++ b/analysis/vis.livemd @@ -96,9 +96,9 @@ cost_models ## Cost model exploratory plots ```elixir -startn = 1000 -endn = 60_000 -resolution = 100 +startn = 1 +endn = 350 +resolution = 10 points_for = fn impl, op -> %{"coeffs" => [coeffs]} = @@ -127,16 +127,12 @@ end ```elixir -set_impls = ["BTreeSet", "SortedUniqueVec", "HashSet"] -mapping_impls = ["HashMap", "BTreeMap"] -list_impls = ["Vec", "LinkedList", "SortedVec"] -stack_impls = ["Vec", "LinkedList"] +set_impls = ["BTreeSet", "HashSet", "VecSet", "SortedVecSet"] +mapping_impls = ["HashMap", "BTreeMap", "VecMap", "SortedVecMap"] +other_impls = ["Vec", "LinkedList", "SortedVec"] -inspect_op = "clear" -# impls = set_impls ++ list_impls ++ mapping_impls -impls = ["Vec"] -# impls = mapping_impls -# impls = ["SortedUniqueVec", "SortedVec"] +inspect_op = "insert" +impls = mapping_impls Tucan.layers([ cost_models @@ -146,18 +142,17 @@ Tucan.layers([ |> Enum.map(fn %{"impl" => impl} -> points_for.(impl, inspect_op) end) |> DF.concat_rows() |> DF.filter(impl in ^impls) - |> Tucan.lineplot("n", "t", color_by: "impl", clip: true), - # |> Tucan.Scale.set_y_domain(0, 200) - Tucan.scatter( - cost_model_points - |> DF.filter(op == ^inspect_op and impl in ^impls) - |> DF.group_by(["impl", "n"]), - # |> DF.summarise(t: mean(t)), - "n", - "t", - color_by: "impl", - clip: true - ) + |> Tucan.lineplot("n", "t", color_by: "impl", clip: true) + # Tucan.scatter( + # cost_model_points + # |> DF.filter(op == ^inspect_op and impl in ^impls) + # |> DF.group_by(["impl", "n"]) + # |> DF.summarise(t: mean(t)), + # "n", + # "t", + # color_by: "impl", + # clip: true + # ) ]) |> Tucan.Axes.set_y_title("Estimated cost") |> Tucan.Axes.set_x_title("Size of container (n)") -- cgit v1.2.3