source: doc/generic_types/evaluation/c-bench.c@ 309be81

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new stuck-waitfor-destruct with_gc
Last change on this file since 309be81 was 309be81, checked in by Aaron Moss <a3moss@…>, 9 years ago

Started evaluation benchmarks for paper (CFA version doesn't compile yet)

  • Property mode set to 100644
File size: 265 bytes
Line 
1#include <stdlib.h>
2#include "bench.h"
3#include "c-stack.h"
4
5int main(int argc, char** argv) {
6 srand(20171025);
7
8 struct stack s = new_stack();
9
10 REPEAT_TIMED( "push_int",
11 int* x = malloc(sizeof(int));
12 *x = rand();
13 push_stack(&s, x);
14 )
15
16 clear_stack(&s);
17}
Note: See TracBrowser for help on using the repository browser.