Ignore:
Timestamp:
Apr 12, 2017, 9:36:33 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, 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:
50b7e8c, d9dd3d1
Parents:
ff178ee
Message:

Add printing code to benchmark

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/cfa-bench.c

    rff178ee r0d10090  
    11#include <stdlib>
    22#include <stdlib.h>
     3#include <stdio.h>
    34#include "pair"
    45#include "bench.h"
    56#include "cfa-stack.h"
     7#include "cfa-print.h"
    68
    79int main(int argc, char** argv) {
     
    4547                max2 = max( max2, pop( &t2 ) );
    4648        )
     49
     50        FILE* out = fopen("cfa-out.txt", "w");
     51        REPEAT_TIMED( "print_int",
     52                print( out, rand(), ":", rand(), "\n" );
     53        )
     54
     55        REPEAT_TIMED( "print_pair",
     56                print( out, (pair(_Bool, char)){ rand() & 0x1, rand() & 0x7F }, ":",
     57                                (pair(_Bool, char)){ rand() & 0x1, rand() & 0x7F }, "\n" );
     58        )
     59        fclose(out);
    4760}
Note: See TracChangeset for help on using the changeset viewer.