Commit 49d7d259 authored by Noric Couderc's avatar Noric Couderc
Browse files

Updated notebooks.

Added some comments, for the most part, and clarified variable names.
Added a data file that was left in the home directory (CollectionsBench
data).
parent cd0d11f7
Loading
Loading
Loading
Loading
+118 −0

File added.

Preview size limit exceeded, changes collapsed.

+3 −8
Original line number Diff line number Diff line
%% Cell type:code id: tags:

``` julia
using Gadfly, DataFrames, Statistics, CSV
```

%% Output

    ┌ Info: Precompiling Gadfly [c91e804a-d5a3-530f-b6f0-dfbca275c004]
    └ @ Base loading.jl:1273

%% Cell type:code id: tags:

``` julia
lists_data = CSV.read("jmh-results-list.csv")
sets_data = CSV.read("jmh-results-set.csv")
maps_data = CSV.read("jmh-results-map.csv")
lists_data = CSV.read("/home/noric/jmh-results-list.csv")
sets_data = CSV.read("/home/e/noric/jmh-results-set.csv")
maps_data = CSV.read("/home/noric/jmh-results-map.csv")
```

%% Output

    \begin{tabular}{r|cc}
    	& Benchmark & \\
    	\hline
    	& String & \\
    	\hline
    	1 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	2 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	3 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	4 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	5 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	6 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	7 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	8 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	9 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	10 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	11 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	12 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	13 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	14 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	15 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	16 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	17 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	18 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	19 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	20 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	21 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	22 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	23 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	24 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	25 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	26 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	27 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	28 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	29 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	30 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	$\dots$ & $\dots$ &  \\
    \end{tabular}
    36×14 DataFrame. Omitted printing of 14 columns
    │ Row │ │     │ ├─────┼
    │ 1   │ │ 2   │ │ 3   │ │ 4   │ │ 5   │ │ 6   │ │ 7   │ │ 8   │ │ 9   │ │ 10  │

    │ 26  │ │ 27  │ │ 28  │ │ 29  │ │ 30  │ │ 31  │ │ 32  │ │ 33  │ │ 34  │ │ 35  │ │ 36  │

%% Cell type:code id: tags:

``` julia
names(sets_data)
```

%% Output

    13-element Array{Symbol,1}:
     :Benchmark
     :Mode
     :Threads
     :Samples
     :Score
     Symbol("Score Error (99.9%)")
     :Unit
     Symbol("Param: impl")
     Symbol("Param: payloadType")
     Symbol("Param: seed")
     Symbol("Param: size")
     :method
     Symbol("Param: workload")

%% Cell type:code id: tags:

``` julia
joined_data = vcat(lists_data, maps_data, sets_data, cols=:intersect)
```

%% Output

    \begin{tabular}{r|cc}
    	& Benchmark & \\
    	\hline
    	& String & \\
    	\hline
    	1 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	2 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	3 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	4 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	5 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	6 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	7 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	8 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	9 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	10 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	11 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	12 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	13 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	14 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	15 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	16 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	17 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	18 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	19 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	20 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	21 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	22 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	23 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	24 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	25 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	26 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	27 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	28 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	29 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	30 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	$\dots$ & $\dots$ &  \\
    \end{tabular}
    117×13 DataFrame. Omitted printing of 13 columns
    │ Row │ │     │ ├─────┼
    │ 1   │ │ 2   │ │ 3   │ │ 4   │ │ 5   │ │ 6   │ │ 7   │ │ 8   │ │ 9   │ │ 10  │

    │ 107 │ │ 108 │ │ 109 │ │ 110 │ │ 111 │ │ 112 │ │ 113 │ │ 114 │ │ 115 │ │ 116 │ │ 117 │

%% Cell type:code id: tags:

``` julia
# Let's see the columns that we have here
names(joined_data)
```

%% Output

    13-element Array{Symbol,1}:
     :Benchmark
     :Mode
     :Threads
     :Samples
     :Score
     Symbol("Score Error (99.9%)")
     :Unit
     Symbol("Param: impl")
     Symbol("Param: payloadType")
     Symbol("Param: seed")
     Symbol("Param: size")
     Symbol("Param: workload")
     :method

%% Cell type:code id: tags:

``` julia
show(unique(joined_data[:method]))
```

%% Output

    ┌ Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.
    │   caller = top-level scope at In[7]:1
    └ @ Core In[7]:1

    ["iterator()", "get(int)", "contains(Object)", "add(Object)", "addAll(Collection)", "put(Object, Object)", "containsKey(Object)", "putAll(Map)", "entrySet()"]

%% Cell type:code id: tags:

``` julia
baselines = ["JDK_ARRAY", "JDK_O2O_HASH", "JDK_HASH"]
baseline_data = filter(r -> r[Symbol("Param: impl")] in baselines, joined_data)
```

%% Output

    \begin{tabular}{r|cc}
    	& Benchmark & \\
    	\hline
    	& String & \\
    	\hline
    	1 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	2 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	3 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	4 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	5 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	6 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	7 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	8 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	9 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	10 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	11 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	12 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	13 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	14 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	15 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	16 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	17 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	18 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	19 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	20 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	21 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	22 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	23 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	24 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	25 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	26 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	27 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.maps.JDKMapBench.bench & $\dots$ \\
    	28 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.sets.JDKSetBench.bench & $\dots$ \\
    	29 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.sets.JDKSetBench.bench & $\dots$ \\
    	30 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.sets.JDKSetBench.bench & $\dots$ \\
    	$\dots$ & $\dots$ &  \\
    \end{tabular}
    39×13 DataFrame. Omitted printing of 13 columns
    │ Row │ │     │ ├─────┼
    │ 1   │ │ 2   │ │ 3   │ │ 4   │ │ 5   │ │ 6   │ │ 7   │ │ 8   │ │ 9   │ │ 10  │

    │ 29  │ │ 30  │ │ 31  │ │ 32  │ │ 33  │ │ 34  │ │ 35  │ │ 36  │ │ 37  │ │ 38  │ │ 39  │

%% Cell type:code id: tags:

``` julia
with_baseline = join(joined_data, baseline_data,
    on = [:Benchmark, Symbol("Param: workload"), Symbol("Param: size"), Symbol("Param: seed")],
    makeunique = true)
names(with_baseline)
```

%% Output

    22-element Array{Symbol,1}:
     :Benchmark
     :Mode
     :Threads
     :Samples
     :Score
     Symbol("Score Error (99.9%)")
     :Unit
     Symbol("Param: impl")
     Symbol("Param: payloadType")
     Symbol("Param: seed")
     Symbol("Param: size")
     Symbol("Param: workload")
     :method
     :Mode_1
     :Threads_1
     :Samples_1
     :Score_1
     Symbol("Score Error (99.9%)_1")
     :Unit_1
     Symbol("Param: impl_1")
     Symbol("Param: payloadType_1")
     :method_1

%% Cell type:code id: tags:

``` julia
speedup = with_baseline[:Score] ./ with_baseline[:Score_1]
insertcols!(with_baseline, 1, :speedup => speedup)
```

%% Output

    ┌ Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.
    │   caller = top-level scope at In[10]:1
    └ @ Core In[10]:1
    ┌ Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.
    │   caller = top-level scope at In[10]:1
    └ @ Core In[10]:1

    \begin{tabular}{r|ccc}
    	& speedup & Benchmark & \\
    	\hline
    	& Float64 & String & \\
    	\hline
    	1 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	2 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	3 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	4 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	5 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	6 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	7 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	8 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	9 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	10 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	11 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	12 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	13 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	14 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	15 & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	16 & 1.03054 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	17 & 0.452003 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	18 & 0.602614 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	19 & 0.978028 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	20 & 0.225268 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	21 & 0.993286 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	22 & 0.0741052 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	23 & 0.446489 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	24 & 1.57727 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	25 & 0.132067 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	26 & 0.720726 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	27 & 0.00722415 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	28 & 0.426626 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	29 & 1.0497 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	30 & 0.127951 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	$\dots$ & $\dots$ & $\dots$ &  \\
    \end{tabular}
    117×23 DataFrame. Omitted printing of 22 columns
    │ Row │ speedup  │
    │     │ Float64  │
    ├─────┼──────────┤
    │ 1   │ 1.0      │
    │ 2   │ 1.0      │
    │ 3   │ 1.0      │
    │ 4   │ 1.0      │
    │ 5   │ 1.0      │
    │ 6   │ 1.0      │
    │ 7   │ 1.0      │
    │ 8   │ 1.0      │
    │ 9   │ 1.0      │
    │ 10  │ 1.0      │

    │ 107 │ 1.0095   │
    │ 108 │ 1.98253  │
    │ 109 │ 0.480391 │
    │ 110 │ 0.405776 │
    │ 111 │ 1.5459   │
    │ 112 │ 2.70782  │
    │ 113 │ 0.410843 │
    │ 114 │ 0.323469 │
    │ 115 │ 1.40685  │
    │ 116 │ 2.20329  │
    │ 117 │ 0.362096 │

%% Cell type:code id: tags:

``` julia
mappings = Dict(
    "JDK_LINKED" => "LinkedList",
    "JDK_VECTOR" => "Vector",
    "JDK_ARRAY" => "ArrayList",
    "JDK_O2O_LINKEDHASH" => "LinkedHashMap",
    "JDK_O2O_TREE" => "TreeMap",
    "JDK_LINKEDHASH" => "LinkedHashSet",
    "JDK_TREE" => "TreeSet",
    "JDK_O2O_HASH" => "HashMap",
    "JDK_HASH" => "HashSet"
)

collection_simple = map(r -> get(mappings, r[Symbol("Param: impl")], "None"), eachrow(with_baseline))
insertcols!(with_baseline, 1, :collection_simple => collection_simple)
```

%% Output

    \begin{tabular}{r|cccc}
    	& collection\_simple & speedup & Benchmark & \\
    	\hline
    	& String & Float64 & String & \\
    	\hline
    	1 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	2 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	3 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	4 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	5 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	6 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	7 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	8 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	9 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	10 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	11 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	12 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	13 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	14 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	15 & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	16 & LinkedList & 1.03054 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	17 & LinkedList & 0.452003 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	18 & LinkedList & 0.602614 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	19 & LinkedList & 0.978028 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	20 & LinkedList & 0.225268 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	21 & LinkedList & 0.993286 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	22 & LinkedList & 0.0741052 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	23 & LinkedList & 0.446489 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	24 & LinkedList & 1.57727 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	25 & LinkedList & 0.132067 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	26 & LinkedList & 0.720726 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	27 & LinkedList & 0.00722415 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	28 & LinkedList & 0.426626 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	29 & LinkedList & 1.0497 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	30 & LinkedList & 0.127951 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	$\dots$ & $\dots$ & $\dots$ & $\dots$ &  \\
    \end{tabular}
    117×24 DataFrame. Omitted printing of 22 columns
    │ Row │ collection_simple │ speedup  │
    │     │ String            │ Float64  │
    ├─────┼───────────────────┼──────────┤
    │ 1   │ ArrayList         │ 1.0      │
    │ 2   │ ArrayList         │ 1.0      │
    │ 3   │ ArrayList         │ 1.0      │
    │ 4   │ ArrayList         │ 1.0      │
    │ 5   │ ArrayList         │ 1.0      │
    │ 6   │ ArrayList         │ 1.0      │
    │ 7   │ ArrayList         │ 1.0      │
    │ 8   │ ArrayList         │ 1.0      │
    │ 9   │ ArrayList         │ 1.0      │
    │ 10  │ ArrayList         │ 1.0      │

    │ 107 │ TreeSet           │ 1.0095   │
    │ 108 │ TreeSet           │ 1.98253  │
    │ 109 │ TreeSet           │ 0.480391 │
    │ 110 │ TreeSet           │ 0.405776 │
    │ 111 │ TreeSet           │ 1.5459   │
    │ 112 │ TreeSet           │ 2.70782  │
    │ 113 │ TreeSet           │ 0.410843 │
    │ 114 │ TreeSet           │ 0.323469 │
    │ 115 │ TreeSet           │ 1.40685  │
    │ 116 │ TreeSet           │ 2.20329  │
    │ 117 │ TreeSet           │ 0.362096 │

%% Cell type:code id: tags:

``` julia
get_interface = r -> if occursin("List", r) "List" elseif occursin("Map", r) "Map" elseif occursin("Set", r) "Set" else "None" end

insertcols!(with_baseline, 1, :interface => map(get_interface, with_baseline[:Benchmark]))
```

%% Output

    ┌ Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.
    │   caller = top-level scope at In[12]:2
    └ @ Core In[12]:2

    \begin{tabular}{r|ccccc}
    	& interface & collection\_simple & speedup & Benchmark & \\
    	\hline
    	& String & String & Float64 & String & \\
    	\hline
    	1 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	2 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	3 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	4 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	5 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	6 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	7 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	8 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	9 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	10 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	11 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	12 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	13 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	14 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	15 & List & ArrayList & 1.0 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	16 & List & LinkedList & 1.03054 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	17 & List & LinkedList & 0.452003 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	18 & List & LinkedList & 0.602614 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	19 & List & LinkedList & 0.978028 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	20 & List & LinkedList & 0.225268 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	21 & List & LinkedList & 0.993286 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	22 & List & LinkedList & 0.0741052 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	23 & List & LinkedList & 0.446489 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	24 & List & LinkedList & 1.57727 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	25 & List & LinkedList & 0.132067 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	26 & List & LinkedList & 0.720726 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	27 & List & LinkedList & 0.00722415 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	28 & List & LinkedList & 0.426626 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	29 & List & LinkedList & 1.0497 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	30 & List & LinkedList & 0.127951 & de.heidelberg.pvs.container\_bench.benchmarks.singleoperations.lists.JDKListBench.bench & $\dots$ \\
    	$\dots$ & $\dots$ & $\dots$ & $\dots$ & $\dots$ &  \\
    \end{tabular}
    117×25 DataFrame. Omitted printing of 22 columns
    │ Row │ interface │ collection_simple │ speedup  │
    │     │ String    │ String            │ Float64  │
    ├─────┼───────────┼───────────────────┼──────────┤
    │ 1   │ List      │ ArrayList         │ 1.0      │
    │ 2   │ List      │ ArrayList         │ 1.0      │
    │ 3   │ List      │ ArrayList         │ 1.0      │
    │ 4   │ List      │ ArrayList         │ 1.0      │
    │ 5   │ List      │ ArrayList         │ 1.0      │
    │ 6   │ List      │ ArrayList         │ 1.0      │
    │ 7   │ List      │ ArrayList         │ 1.0      │
    │ 8   │ List      │ ArrayList         │ 1.0      │
    │ 9   │ List      │ ArrayList         │ 1.0      │
    │ 10  │ List      │ ArrayList         │ 1.0      │

    │ 107 │ Set       │ TreeSet           │ 1.0095   │
    │ 108 │ Set       │ TreeSet           │ 1.98253  │
    │ 109 │ Set       │ TreeSet           │ 0.480391 │
    │ 110 │ Set       │ TreeSet           │ 0.405776 │
    │ 111 │ Set       │ TreeSet           │ 1.5459   │
    │ 112 │ Set       │ TreeSet           │ 2.70782  │
    │ 113 │ Set       │ TreeSet           │ 0.410843 │
    │ 114 │ Set       │ TreeSet           │ 0.323469 │
    │ 115 │ Set       │ TreeSet           │ 1.40685  │
    │ 116 │ Set       │ TreeSet           │ 2.20329  │
    │ 117 │ Set       │ TreeSet           │ 0.362096 │

%% Cell type:code id: tags:

``` julia
CSV.write("CB-with-baseline.csv", with_baseline)
```

%% Output

    "CB-with-baseline.csv"

%% Cell type:code id: tags:

``` julia
# We can try to see the score per implementation and workload
grouped = by(filter(r -> ! (r[Symbol("Param: impl")] in baselines), with_baseline), [:collection_simple, :method], :speedup => median)
# sort(grouped, order(:speedup_median, rev=true))
plot(grouped, x=:method, y=:speedup_median, color=:collection_simple, Geom.point)
```

%% Output

    ┌ Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.
    │   caller = evalmapping(::DataFrame, ::Symbol) at dataframes.jl:96
    └ @ Gadfly /home/noric/.julia/packages/Gadfly/1wgcD/src/dataframes.jl:96

    Plot(...)

%% Cell type:markdown id: tags:

Create table comparing collectionsBench and by method (with diff of medians)

- ITERATE: iterator(), iterator.hasNext(), next(). Entry.getKey(), Entry.getValue()
- POPULATE:
    - List, Set: add()
    - Map: put()
- CONTAINS: contains()
- COPY:
    - List, Set: addAll()
    - Map: putAll
- GET_INDEX: List.get()

%% Cell type:code id: tags:

``` julia
category_method =
    Dict([
        ("List", "POPULATE") => "add(Object)",
        ("Map", "POPULATE") => "put(Object)",
        ("Set", "POPULATE") => "add(Object)",
        ("List", "CONTAINS") => "contains(Object)",
        ("Map", "CONTAINS") => "contains(Object)",
        ("Set", "CONTAINS") => "contains(Object)",
        ("List", "COPY") => "addAll(Collection)",
        ("Map", "COPY") => "putAll(Collection)",
        ("Set", "COPY") => "addAll(Collection)",
        ("List", "GET_INDEX") => "get(int)",
        ])

aggregate(r -> category_method[(r[:interface],r[Symbol("Param: workload")])], with_baseline)
```

%% Output

MethodError: no method matching aggregate(::var"#23#24", ::DataFrame)
Closest candidates are:
  aggregate(!Matched::AbstractDataFrame, ::Any; sort) at /home/noric/.julia/packages/DataFrames/yH0f6/src/groupeddataframe/grouping.jl:1147
  aggregate(!Matched::GroupedDataFrame, ::Any; sort) at /home/noric/.julia/packages/DataFrames/yH0f6/src/groupeddataframe/grouping.jl:1155
Stacktrace:
 [1] top-level scope at In[23]:14

%% Cell type:code id: tags:

``` julia
median(lists_data[:Score])
```

%% Output

    ┌ Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.
    │   caller = top-level scope at In[13]:1
    └ @ Core In[13]:1

    0.001028
+7915 −4167

File changed.

Preview size limit exceeded, changes collapsed.