aboutsummaryrefslogtreecommitdiff
path: root/thesis/parts/implementation.tex
blob: 50098362f205751ddf83a5933acfa3c427693023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
\todo{Introduction}

\section{Modifications to Primrose}

%% API

%% Mapping trait

%% We add a new mapping trait to primrose to express KV maps

%% \todo{add and list library types}

%% the constraint solver has been updated to allow properties on dicts (dictproperty), but this was unused.

%% Resiliency, etc

\section{Cost models}

%% Benchmarker crate

%% each trait has its own set of benchmarks, which run different workloads
%% benchmarker trait doesn't have Ns
%% example benchmarks for hashmap and vec

%% Code generation

%% \code{candelabra::cost::benchmark} generates code which just calls \code{candelabra\_benchmarker} methods
%% Ns are set there, and vary from [...]

%% fitting done with least squares in \code{candelabra::cost::fit}
%% list other methods tried
%% simple, which helps 'smooth out' noisy benchmark results

\section{Profiling}

%% profiler type in \code{primrose\_library::profiler}
%% wraps an 'inner' implementation and implements whatever operations it does, keeping track of number of calls
%% on drop, creates new file in folder specified by env variable

%% primrose results generated in \code{primrose::codegen}, which is called in \code{candelabra::profiler}
%% picks the first valid candidate - performance doesn't really matter for this case
%% each drop generates a file, so we get details of every individual collection allocated

\section{Selection and Codegen}

%% Generated code (opaque types)

%% Selection Algorithm incl Adaptiv

%% Implementation w/ const generics

\section{Misc Concerns}

\todo{Justify Rust as language}

\todo{Explain cargo's role in rust projects \& how it is integrated}

%% get project metadata from cargo
%% available benchmarks and source directories
%% works with most projects
%% could be expanded to run as cargo command

\todo{Caching and stuff}

\todo{Ease of use}

%% parse minimal amount of information from criterion benchmark
%% most common benchmarking tool, closest there is to a standard
%% should be easy to adapt if/when cargo ships proper benchmarking support