Skip to content

Commit cbf2ad9

Browse files
committed
Adding example of TABULAR SELECT in LaTeX paper.tex
1 parent 28cf19a commit cbf2ad9

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

examples/sorting-speed/paper.pdf

23.9 KB
Binary file not shown.

examples/sorting-speed/paper.tex

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,42 @@
5959
\end{tikzpicture}
6060
\end{center}
6161

62+
\begin{table}\centering
63+
\begin{tabular}{l|rrr}
64+
$n$ & \texttt{std::sort} & \texttt{std::stable\_sort} & STL heap sort \\ \hline
65+
%% TABULAR REFORMAT(col 1-3=(precision=1) row 0-100=(min=bold))
66+
%% SELECT '$2^{' || FLOOR(LOG(2, size)) || '}$' AS x,
67+
%% (SELECT MEDIAN(time / repeats / size * 1e9) FROM stats s1 WHERE s1.algo='std::sort' AND s1.size = s.size GROUP BY s1.size),
68+
%% (SELECT MEDIAN(time / repeats / size * 1e9) FROM stats s1 WHERE s1.algo='std::stable_sort' AND s1.size = s.size GROUP BY s1.size),
69+
%% (SELECT MEDIAN(time / repeats / size * 1e9) FROM stats s1 WHERE s1.algo='std::heap_sort' AND s1.size = s.size GROUP BY s1.size)
70+
%% FROM stats s
71+
%% GROUP BY s.size ORDER BY s.size
72+
$2^{10}$ & \bf 9.5 & 17.5 & 52.7 \\
73+
$2^{11}$ & \bf 10.2 & 19.0 & 54.5 \\
74+
$2^{12}$ & \bf 10.8 & 20.8 & 55.6 \\
75+
$2^{13}$ & \bf 11.7 & 22.6 & 57.3 \\
76+
$2^{14}$ & \bf 12.5 & 25.3 & 60.2 \\
77+
$2^{15}$ & \bf 13.2 & 27.2 & 62.6 \\
78+
$2^{16}$ & \bf 13.9 & 29.4 & 63.4 \\
79+
$2^{17}$ & \bf 14.7 & 31.0 & 64.9 \\
80+
$2^{18}$ & \bf 15.8 & 33.4 & 68.0 \\
81+
$2^{19}$ & \bf 17.0 & 35.4 & 71.5 \\
82+
$2^{20}$ & \bf 18.7 & 40.8 & 74.3 \\
83+
$2^{21}$ & \bf 21.7 & 44.7 & 81.0 \\
84+
$2^{22}$ & \bf 27.1 & 49.4 & 92.9 \\
85+
$2^{23}$ & \bf 37.4 & 56.6 & 119.1 \\
86+
$2^{24}$ & \bf 58.0 & 69.6 & 177.5 \\
87+
$2^{25}$ & 100.0 & \bf 92.3 & 311.0 \\
88+
$2^{26}$ & 103.9 & \bf 96.3 & 348.7 \\
89+
$2^{27}$ & 106.3 & \bf 99.2 & 395.5 \\
90+
$2^{28}$ & 110.1 & \bf 103.3 & 448.2 \\
91+
$2^{29}$ & 113.8 & \bf 106.1 & 509.2 \\
92+
$2^{30}$ & 117.5 & \bf 110.2 & 576.3 \\
93+
% END TABULAR SELECT '$2^{' || FLOOR(LOG(2, size)) || '}$' AS x, (SELECT MEDI...
94+
\end{tabular}
95+
\caption{Runtime per element for different sorting implementation, median of 15 runs.}
96+
\end{table}
97+
6298
\end{document}
6399

64100
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0 commit comments

Comments
 (0)