aboutsummaryrefslogtreecommitdiff
path: root/analysis/vis.livemd
diff options
context:
space:
mode:
authorAria Shrimpton <me@aria.rip>2024-03-20 14:46:16 +0000
committerAria Shrimpton <me@aria.rip>2024-03-20 14:46:16 +0000
commit2494567b4b7ccd675fb4cdeb23e8c181db1ccfe6 (patch)
tree8494a1badc3e7f04b9b6b096743ca3a6512811ae /analysis/vis.livemd
parent9983783e1ec5b8635471ee80146a956466245cbb (diff)
new data
Diffstat (limited to 'analysis/vis.livemd')
-rw-r--r--analysis/vis.livemd31
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)
```