Changeset b4107c8 for benchmark/basic


Ignore:
Timestamp:
Jan 7, 2020, 3:50:56 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
580c11b
Parents:
846c026
Message:

update existing benchmarks for changes to bench.h, add new benchmarks in new programming languages

Location:
benchmark/basic
Files:
2 added
3 moved

Legend:

Unmodified
Added
Removed
  • benchmark/basic/fetch_add.c

    r846c026 rb4107c8  
    1111}
    1212
    13 int main(int argc, char* argv[]) {
     13int main( int argc, char * argv[] ) {
     14        BENCH_START()
    1415        BENCH(
    15                 for (size_t i = 0; i < n; i++) {
     16                for (size_t i = 0; i < times; i++) {
    1617                        do_call();
    1718                },
    1819                result
    1920        )
     21        printf( "%g\n", result );
     22}
    2023
    21         printf("%g\n", result);
    22 }
     24// Local Variables: //
     25// tab-width: 4 //
     26// End: //
  • benchmark/basic/tls_fetch_add.c

    r846c026 rb4107c8  
    1616}
    1717
    18 int main(int argc, char* argv[]) {
     18int main( int argc, char * argv[] ) {
     19        BENCH_START()
    1920        BENCH(
    20                 for (size_t i = 0; i < n; i++) {
     21                for (size_t i = 0; i < times; i++) {
    2122                        do_call();
    2223                },
    2324                result
    2425        )
     26        printf( "%g\n", result );
     27}
    2528
    26         printf("%g\n", result);
    27 }
     29// Local Variables: //
     30// tab-width: 4 //
     31// End: //
  • benchmark/basic/ttst_lock.c

    r846c026 rb4107c8  
    3535}
    3636
    37 int main(int argc, char* argv[]) {
     37int main( int argc, char * argv[] ) {
     38        BENCH_START()
    3839        BENCH(
    39                 for (size_t i = 0; i < n; i++) {
     40                for (size_t i = 0; i < times; i++) {
    4041                        do_call();
    4142                },
    4243                result
    43                 )
    44 
    45                 printf("%g\n", result);
     44        )
     45        printf( "%g\n", result );
    4646}
    4747
Note: See TracChangeset for help on using the changeset viewer.