Changes in / [4ae83a4b:c87cd93]


Ignore:
Location:
doc/generic_types
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/.gitignore

    r4ae83a4b rc87cd93  
    1717*.synctex.gz
    1818comment.cut
    19 timing.tex
  • doc/generic_types/generic_types.tex

    r4ae83a4b rc87cd93  
    214214A design advantage is that, unlike \CC template-functions, \CFA polymorphic-functions are compatible with C \emph{separate compilation}, preventing compilation and code bloat.
    215215
    216 Since bare polymorphic-types provide a restricted set of available operations, \CFA provides a \emph{type assertion}~\cite[pp.~37-44]{Alphard} mechanism to provide further type information, where type assertions may be variable or function declarations that depend on a polymorphic type-variable.
     216Since bare polymorphic-types provide a restricted set of available operations, \CFA provides a \emph{type assertion}~\cite{alphard} mechanism to provide further type information, where type assertions may be variable or function declarations that depend on a polymorphic type-variable.
    217217For example, the function @twice@ can be defined using the \CFA syntax for operator overloading:
    218218\newpage
     
    280280\lstDeleteShortInline@%
    281281\par\smallskip
    282 \begin{tabular}{@{}l@{\hspace{1.5\parindent}}||@{\hspace{1.5\parindent}}l@{}}
     282\begin{tabular}{@{}l@{\hspace{\parindent}}|@{\hspace{\parindent}}l@{}}
    283283\begin{lstlisting}
    284284short int MAX = ...;
     
    587587\lstDeleteShortInline@%
    588588\par\smallskip
    589 \begin{tabular}{@{}l@{\hspace{1.5\parindent}}||@{\hspace{1.5\parindent}}l@{}}
     589\begin{tabular}{@{}l@{\hspace{\parindent}}|@{\hspace{\parindent}}l@{}}
    590590\begin{lstlisting}
    591591int f( int, int );
     
    616616\lstDeleteShortInline@%
    617617\par\smallskip
    618 \begin{tabular}{@{}l@{\hspace{1.5\parindent}}||@{\hspace{1.5\parindent}}l@{}}
     618\begin{tabular}{@{}l@{\hspace{\parindent}}|@{\hspace{\parindent}}l@{}}
    619619\begin{lstlisting}
    620620int x = 10;
     
    658658\lstDeleteShortInline@%
    659659\par\smallskip
    660 \begin{tabular}{@{}l@{\hspace{1.5\parindent}}||@{\hspace{1.5\parindent}}l@{}}
     660\begin{tabular}{@{}l@{\hspace{\parindent}}|@{\hspace{\parindent}}l@{}}
    661661\begin{lstlisting}
    662662[int, int, long, double] x;
     
    10191019\end{table}
    10201020
    1021 The C and \CCV variants are generally the slowest with the largest memory footprint, because of their less-efficient memory layout and the pointer-indirection necessary to implement generic types;
     1021The C and \CCV variants are generally the slowest with the largest memory footprint, because to their less-efficient memory layout and the pointer-indirection necessary to implement generic types;
    10221022this inefficiency is exacerbated by the second level of generic types in the pair-based benchmarks.
    10231023By contrast, the \CFA and \CC variants run in roughly equivalent time for both the integer and pair of @_Bool@ and @char@ because the storage layout is equivalent.
Note: See TracChangeset for help on using the changeset viewer.