comparison paper/aplas2012.tex @ 7:bcacfe595c2a

add memo.txt
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 12 Jun 2012 01:03:27 +0900
parents 635448a197ac
children a9c4eb2b29b8
comparison
equal deleted inserted replaced
6:635448a197ac 7:bcacfe595c2a
44 44
45 45
46 \section{Continuation based C} 46 \section{Continuation based C}
47 47
48 \section{recursive type syntax} 48 \section{recursive type syntax}
49 We implemeted \verb+__rectype+ syntax on GCC.
50 \verb+__rectype+ syntax is declare a recursive type.
51
52 \subsection{What is recursive type}
53 Recursive type is
54
55
56
57 \begin{lstlisting}
58 __code csA( __code (*p)( __code (*)( __code (*)( __code )))) {
59 goto p(csB);
60 }
61 \end{lstlisting}
62
63
64 This example is rectype syntax:
65
66 \begin{lstlisting}
67 __code csA( __rectype *p) {
68 goto p(csB);
69 }
70 \end{lstlisting}
49 71
50 72
51 \begin{figure}[htpb] 73 \begin{figure}[htpb]
52 \begin{minipage}{0.5\hsize} 74 \begin{minipage}{0.5\hsize}
53 \begin{center} 75 \begin{center}
63 \caption{\_\_rectype} 85 \caption{\_\_rectype}
64 \label{fig:tree2} 86 \label{fig:tree2}
65 \end{minipage} 87 \end{minipage}
66 \end{figure} 88 \end{figure}
67 89
68 \begin{table}[htpb]
69 \centering
70 \small
71 \begin{tabular}{|l|r|r|r|} \hline
72 (unit: s) & ./conv1 1 & ./conv1 2 & ./conv1 3 \\ \hline
73 Micro-C(32bit) & 9.93 & 6.31 & 7.18 \\ \hline
74 Micro-C(64bit) & 5.03 & 5.12 & 5.00 \\ \hline \hline
75 GCC -O3(32bit) & 2.52 & 2.34 & 1.53 \\ \hline
76 GCC -O3(64bit) & 1.80 & 1.20 & 1.44 \\ \hline
77 \end{tabular}
78 \caption{Micro-C, GCC bench mark (in sec)}
79 \label{tab:mc,gcc,compare}
80 \end{table}
81 90
82
83 \begin{lstlisting}
84 __code fibonacci( __code (*p)( __code (*)( __code (*)( __code )))) {
85 goto p(fibonacci2);
86 \end{lstlisting}
87
88
89 \begin{lstlisting}
90 __code fibonacci(__rectype *p, int num, int count, int result, int prev) {
91 \end{lstlisting}
92 91
93 92
94 \begin{lstlisting} 93 \begin{lstlisting}
95 struct interface { 94 struct interface {
96 __code (*next)(struct interface); 95 __code (*next)(struct interface);
108 } 107 }
109 \end{lstlisting} 108 \end{lstlisting}
110 109
111 110
112 111
112
113
114 \begin{lstlisting}
115 __code fibonacci(__rectype *p, int num, int count, int result, int prev) {
116 \end{lstlisting}
117
118
119
120
121
122
123 \begin{table}[htpb]
124 \centering
125 \small
126 \begin{tabular}{|l|r|r|r|} \hline
127 (unit: s) & ./conv1 1 & ./conv1 2 & ./conv1 3 \\ \hline
128 Micro-C(32bit) & 9.93 & 6.31 & 7.18 \\ \hline
129 Micro-C(64bit) & 5.03 & 5.12 & 5.00 \\ \hline \hline
130 GCC -O3(32bit) & 2.52 & 2.34 & 1.53 \\ \hline
131 GCC -O3(64bit) & 1.80 & 1.20 & 1.44 \\ \hline
132 \end{tabular}
133 \caption{Micro-C, GCC bench mark (in sec)}
134 \label{tab:mc,gcc,compare}
135 \end{table}
136
137
138
139
140
141
142
113 \bibliographystyle{junsrt} 143 \bibliographystyle{junsrt}
114 \bibliography{cbc} 144 \bibliography{cbc}
115 \nocite{kono:2002a, kono:2000a, kono:2008a, yogi:2008a, yogi:2008b, yan:2002a,gcc_internals} 145 \nocite{kono:2002a, kono:2000a, kono:2008a, yogi:2008a, yogi:2008b, yan:2002a,gcc_internals}
116 146
117 147