Ignore:
Timestamp:
Apr 7, 2017, 6:17:03 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
b276be5, c51b5a3
Parents:
a0ad7dc
Message:

Update generics paper benchmarks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/bench.h

    ra0ad7dc rd919f47  
     1#pragma once
     2
    13#include <stdio.h>
    24#include <time.h>
    35
    4  // #define N 50000000
    5  #define N 5
    6 
     6 #define N 50000000
     7 
    78
    89long ms_between(clock_t start, clock_t end) {
     
    1112
    1213#define TIMED(name, code) { \
    13         clock_t start, end; \
    14         start = clock(); \
     14        clock_t _start, _end; \
     15        _start = clock(); \
    1516        code \
    16         end = clock(); \
    17         printf("%s:\t%7ld ms\n", name, ms_between(start, end)); \
     17        _end = clock(); \
     18        printf("%s:\t%7ld ms\n", name, ms_between(_start, _end)); \
    1819}
    1920
    20 #define REPEAT_TIMED(name, code) TIMED( name, for (int i = 0; i < N; ++i) { code } )
     21#define REPEAT_TIMED(name, code) TIMED( name, for (int _i = 0; _i < N; ++_i) { code } )
Note: See TracChangeset for help on using the changeset viewer.