Changeset c87cd93 for doc/generic_types/generic_types.tex
- Timestamp:
- Apr 17, 2017, 3:47:07 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 4ae83a4b
- Parents:
- 33e22da
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/generic_types.tex
r33e22da rc87cd93 964 964 \begin{figure} 965 965 \begin{lstlisting}[xleftmargin=3\parindentlnth,aboveskip=0pt,belowskip=0pt] 966 int main( int argc, char * 966 int main( int argc, char *argv[] ) { 967 967 FILE * out = fopen( "cfa-out.txt", "w" ); 968 int max = 0, vali = 42;968 int maxi = 0, vali = 42; 969 969 stack(int) si, ti; 970 970 971 REPEAT_TIMED( "push_int", push( &si, vali ); )971 REPEAT_TIMED( "push_int", N, push( &si, vali ); ) 972 972 TIMED( "copy_int", ti = si; ) 973 973 TIMED( "clear_int", clear( &si ); ) 974 REPEAT_TIMED( "pop_int", max = max( max, pop( &ti ) ); ) 975 REPEAT_TIMED( "print_int", print( out, vali, ":", vali, "\n" ); ) 976 977 pair(_Bool, char) maxp = { (_Bool)0, '\0' }, valp = { (_Bool)0, 'a' }; 974 REPEAT_TIMED( "pop_int", N, 975 int xi = pop( &ti ); 976 if ( xi > maxi ) { maxi = xi; } ) 977 REPEAT_TIMED( "print_int", N/2, print( out, vali, ":", vali, "\n" ); ) 978 979 pair(_Bool, char) maxp = { (_Bool)0, '\0' }, valp = { (_Bool)1, 'a' }; 978 980 stack(pair(_Bool, char)) sp, tp; 979 981 980 REPEAT_TIMED( "push_pair", push( &sp, valp ); )982 REPEAT_TIMED( "push_pair", N, push( &sp, valp ); ) 981 983 TIMED( "copy_pair", tp = sp; ) 982 984 TIMED( "clear_pair", clear( &sp ); ) 983 REPEAT_TIMED( "pop_pair", maxp = max( maxp, pop( &tp ) ); ) 984 REPEAT_TIMED( "print_pair", print( out, valp, ":", valp, "\n" ); ) 985 REPEAT_TIMED( "pop_pair", N, 986 pair(_Bool, char) xp = pop( &tp ); 987 if ( xp > maxp ) { maxp = xp; } ) 988 REPEAT_TIMED( "print_pair", N/2, print( out, valp, ":", valp, "\n" ); ) 985 989 fclose(out); 986 990 } … … 1008 1012 \begin{tabular}{rrrrr} 1009 1013 & \CT{C} & \CT{\CFA} & \CT{\CC} & \CT{\CCV} \\ \hline 1010 maximum memory usage (MB) & 10001 & 250 1& 2503 & 11253 \\1011 source code size (lines) & 301 & 224 & 188 & 437\\1012 redundant type annotations (lines) & 46 & 3& 2 & 15 \\1013 binary size (KB) & 1 8 & 234 & 18 & 42\\1014 maximum memory usage (MB) & 10001 & 2502 & 2503 & 11253 \\ 1015 source code size (lines) & 247 & 223 & 165 & 339 \\ 1016 redundant type annotations (lines) & 39 & 2 & 2 & 15 \\ 1017 binary size (KB) & 14 & 229 & 18 & 38 \\ 1014 1018 \end{tabular} 1015 1019 \end{table}
Note: See TracChangeset
for help on using the changeset viewer.