Ignore:
Timestamp:
Apr 15, 2017, 7:09:59 PM (4 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
c57d1935
Parents:
308880c
Message:

Minor cleanup, also filled in benchmark source appendix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/generic_types.tex

    r308880c ra381b46  
    10161016The benchmarks were run on an Ubuntu 16.04 workstation with 16 GB of RAM and a 6-core AMD FX-6300 CPU with 3.5 GHz maximum clock frequency.
    10171017The C and \CCV variants are generally the slowest and most memory-hungry, due to their less-efficient memory layout and the pointer-indirection necessary to implement generic types in these languages; this problem is exacerbated by the second level of generic types in the pair-based benchmarks.
    1018 By contrast, the \CFA and \CC variants run in roughly equivalent time for both the integer and pair of boolean and char tests, which makes sense given that an integer is actually larger than the pair in both languages.
     1018By contrast, the \CFA and \CC variants run in roughly equivalent time for both the integer and pair of boolean and char tests, which makes sense given that an integer is actually larger than the pair in both languages.
     1019\CCV is slower than C largely due to the cost of runtime type-checking of down-casts (implemented here using the \CC @dynamic_cast@ mechanism); our C benchmark uses unchecked casts due to the lack of a language mechanism to perform such checks, while \CFA and \CC can enforce type-safety statically at compilation.
    10191020
    10201021\CC performs best because it uses header-only inlined libraries (\ie no separate compilation).
     
    11231124\bibliography{cfa}
    11241125
    1125 
    11261126\appendix
    11271127
    1128 
    1129 \section{BenchMarks}
     1128\section{Benchmark Source Code}
    11301129\label{sec:BenchMarks}
    11311130
    1132 TODO
     1131Throughout, @/***/@ designates a counted redundant type annotation.
     1132
     1133\subsubsection{bench.h}
     1134(\texttt{bench.hpp} is similar.)
     1135
     1136\lstinputlisting{evaluation/bench.h}
     1137
     1138\subsection{C}
     1139
     1140\subsubsection{c-stack.h} ~
     1141
     1142\lstinputlisting{evaluation/c-stack.h}
     1143
     1144\subsubsection{c-stack.c} ~
     1145
     1146\lstinputlisting{evaluation/c-stack.c}
     1147
     1148\subsubsection{c-pair.h} ~
     1149
     1150\lstinputlisting{evaluation/c-pair.h}
     1151
     1152\subsubsection{c-pair.c} ~
     1153
     1154\lstinputlisting{evaluation/c-pair.c}
     1155
     1156\subsubsection{c-print.h} ~
     1157
     1158\lstinputlisting{evaluation/c-print.h}
     1159
     1160\subsubsection{c-print.c} ~
     1161
     1162\lstinputlisting{evaluation/c-print.c}
     1163
     1164\subsubsection{c-bench.c} ~
     1165
     1166\lstinputlisting{evaluation/c-bench.c}
     1167
     1168\subsection{\CFA}
     1169
     1170\subsubsection{cfa-stack.h} ~
     1171
     1172\lstinputlisting{evaluation/cfa-stack.h}
     1173
     1174\subsubsection{cfa-stack.c} ~
     1175
     1176\lstinputlisting{evaluation/cfa-stack.c}
     1177
     1178\subsubsection{cfa-print.h} ~
     1179
     1180\lstinputlisting{evaluation/cfa-print.h}
     1181
     1182\subsubsection{cfa-print.c} ~
     1183
     1184\lstinputlisting{evaluation/cfa-print.c}
     1185
     1186\subsubsection{cfa-bench.c} ~
     1187
     1188\lstinputlisting{evaluation/cfa-bench.c}
     1189
     1190\subsection{\CC}
     1191
     1192\subsubsection{cpp-stack.hpp} ~
     1193
     1194\lstinputlisting[language=c++]{evaluation/cpp-stack.hpp}
     1195
     1196\subsubsection{cpp-print.hpp} ~
     1197
     1198\lstinputlisting[language=c++]{evaluation/cpp-print.hpp}
     1199
     1200\subsubsection{cpp-bench.cpp} ~
     1201
     1202\lstinputlisting[language=c++]{evaluation/cpp-bench.cpp}
     1203
     1204\subsection{\CCV}
     1205
     1206\subsubsection{object.hpp} ~
     1207
     1208\lstinputlisting[language=c++]{evaluation/object.hpp}
     1209
     1210\subsubsection{cpp-vstack.hpp} ~
     1211
     1212\lstinputlisting[language=c++]{evaluation/cpp-vstack.hpp}
     1213
     1214\subsubsection{cpp-vstack.cpp} ~
     1215
     1216\lstinputlisting[language=c++]{evaluation/cpp-vstack.cpp}
     1217
     1218\subsubsection{cpp-vprint.hpp} ~
     1219
     1220\lstinputlisting[language=c++]{evaluation/cpp-vprint.hpp}
     1221
     1222\subsubsection{cpp-vbench.cpp} ~
     1223
     1224\lstinputlisting[language=c++]{evaluation/cpp-vbench.cpp}
    11331225
    11341226\end{document}
Note: See TracChangeset for help on using the changeset viewer.