Changeset 47535a0d for doc/generic_types


Ignore:
Timestamp:
Apr 10, 2017, 5:26:04 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:
65cb413
Parents:
2f0fc56
Message:

Update benchmarks to report peak memory usage

Location:
doc/generic_types/evaluation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/Makefile

    r2f0fc56 r47535a0d  
    5555
    5656run-c: c-bench
     57        @echo
    5758        @echo '## C ##'
    58         @./c-bench
    59         @printf 'source_size:\t%7d lines\n' `cat c-bench.c bench.h c-stack.h c-stack.c | wc -l`
    60         @printf 'binary_size:\t%7d bytes\n' `wc -c < c-bench`
     59        @/usr/bin/time -f 'max_memory:\t%M kilobytes' ./c-bench
     60        @printf 'source_size:\t%8d lines\n' `cat c-bench.c bench.h c-stack.h c-stack.c | wc -l`
     61        @printf 'binary_size:\t%8d bytes\n' `stat -c %s c-bench`
    6162
    6263run-cfa: cfa-bench
     64        @echo
    6365        @echo '## Cforall ##'
    64         @./cfa-bench
    65         @printf 'source_size:\t%7d lines\n' `cat cfa-bench.c bench.h cfa-stack.h cfa-stack.c | wc -l`
    66         @printf 'binary_size:\t%7d bytes\n' `wc -c < cfa-bench`
     66        @/usr/bin/time -f 'max_memory:\t %M kilobytes' ./cfa-bench
     67        @printf 'source_size:\t%8d lines\n' `cat cfa-bench.c bench.h cfa-stack.h cfa-stack.c | wc -l`
     68        @printf 'binary_size:\t%8d bytes\n' `stat -c %s cfa-bench`
    6769
    6870run-cpp: cpp-bench
     71        @echo
    6972        @echo '## C++ ##'
    70         @./cpp-bench
    71         @printf 'source_size:\t%7d lines\n' `cat cpp-bench.cpp bench.hpp cpp-stack.hpp | wc -l`
    72         @printf 'binary_size:\t%7d bytes\n' `wc -c < cpp-bench`
     73        @/usr/bin/time -f 'max_memory:\t %M kilobytes' ./cpp-bench
     74        @printf 'source_size:\t%8d lines\n' `cat cpp-bench.cpp bench.hpp cpp-stack.hpp | wc -l`
     75        @printf 'binary_size:\t%8d bytes\n' `stat -c %s cpp-bench`
    7376
    7477run-cppv: cpp-vbench
     78        @echo
    7579        @echo '## C++ virtual ##'
    76         @./cpp-vbench
    77         @printf 'source_size:\t%7d lines\n' `cat cpp-vbench.cpp bench.hpp object.hpp cpp-vstack.hpp cpp-vstack.cpp | wc -l`
    78         @printf 'binary_size:\t%7d bytes\n' `wc -c < cpp-vbench`
     80        @/usr/bin/time -f 'max_memory:\t%M kilobytes' ./cpp-vbench
     81        @printf 'source_size:\t%8d lines\n' `cat cpp-vbench.cpp bench.hpp object.hpp cpp-vstack.hpp cpp-vstack.cpp | wc -l`
     82        @printf 'binary_size:\t%8d bytes\n' `stat -c %s cpp-vbench`
    7983
    8084run: run-c run-cfa run-cpp run-cppv
  • doc/generic_types/evaluation/bench.h

    r2f0fc56 r47535a0d  
    44#include <time.h>
    55
    6  #define N 100000000
    7  
     6#define N 100000000
    87
    98long ms_between(clock_t start, clock_t end) {
     
    1615        code \
    1716        _end = clock(); \
    18         printf("%s:\t%7ld ms\n", name, ms_between(_start, _end)); \
     17        printf("%s:\t%8ld ms\n", name, ms_between(_start, _end)); \
    1918}
    2019
  • doc/generic_types/evaluation/bench.hpp

    r2f0fc56 r47535a0d  
    55#include <time.h>
    66
    7  #define N 100000000
    8  
     7static const int N = 100000000;
    98
    109long ms_between(clock_t start, clock_t end) {
     
    1716        code \
    1817        _end = clock(); \
    19         std::cout << name << ":\t" << std::setw(7) << ms_between(_start, _end) << std::setw(0) << " ms" << std::endl; \
     18        std::cout << name << ":\t" << std::setw(8) << ms_between(_start, _end) << std::setw(0) << " ms" << std::endl; \
    2019}
    2120
Note: See TracChangeset for help on using the changeset viewer.