diff options
Diffstat (limited to 'analysis/vis.livemd')
-rw-r--r-- | analysis/vis.livemd | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/analysis/vis.livemd b/analysis/vis.livemd index 3eead6f..a9e0037 100644 --- a/analysis/vis.livemd +++ b/analysis/vis.livemd @@ -97,8 +97,8 @@ cost_models ```elixir startn = 1 -endn = 350 -resolution = 10 +endn = 5000 +resolution = 1 points_for = fn impl, op -> %{"coeffs" => [coeffs]} = @@ -117,7 +117,7 @@ points_for = fn impl, op -> impl: String.split(impl, "::") |> List.last(), op: op, n: n, - t: t + t: max(t, 0) } end) |> DF.new() @@ -131,8 +131,8 @@ set_impls = ["BTreeSet", "HashSet", "VecSet", "SortedVecSet"] mapping_impls = ["HashMap", "BTreeMap", "VecMap", "SortedVecMap"] other_impls = ["Vec", "LinkedList", "SortedVec"] -inspect_op = "insert" -impls = mapping_impls +inspect_op = "remove" +impls = ["Vec", "LinkedList"] Tucan.layers([ cost_models @@ -146,10 +146,10 @@ Tucan.layers([ # 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", + # |> DF.group_by(["impl", "n"]), + # # |> DF.summarise(t: mean(t)) + # "n", + # "t", # color_by: "impl", # clip: true # ) @@ -157,12 +157,19 @@ Tucan.layers([ |> Tucan.Axes.set_y_title("Estimated cost") |> Tucan.Axes.set_x_title("Size of container (n)") |> Tucan.Scale.set_x_domain(startn, endn) -# |> Tucan.Scale.set_y_domain(0, 200) +# |> Tucan.Scale.set_y_domain(0, 10_000) |> Tucan.set_size(500, 250) |> Tucan.Legend.set_title(:color, "Implementation") |> Tucan.Legend.set_orientation(:color, "bottom") ``` +```elixir +cost_model_points +|> DF.filter(impl == "LinkedList" and op == "remove") +|> DF.group_by("n") +|> DF.summarise(t: mean(t)) +``` + ## Read benchmark data ```elixir @@ -377,12 +384,12 @@ singular_position_comparison ```elixir singular_estimated_costs -|> DF.filter(proj == "aoc_2022_14") +|> DF.filter(proj == "prime_sieve") |> DF.sort_by(estimated_cost) ``` ```elixir singular_benchmarks -|> DF.filter(proj == "aoc_2022_14") +|> DF.filter(proj == "prime_sieve") |> DF.sort_by(time) ``` |