~linaro-toolchain-dev/cortex-strings/trunk

« back to all changes in this revision

Viewing changes to scripts/bench-all.sh

  • Committer: Michael Hope
  • Date: 2011-08-31 04:04:26 UTC
  • Revision ID: michael.hope@linaro.org-20110831040426-fjpxcmw0zmsrh8cp
Added some scripts to run the benchmarks and to plot the results.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
#
3
 
# Benchmark all variants of all functions
4
 
 
5
 
# memcpy: 9.905206 s for 10000000 calls to memcpy of 3328 bytes.  ~3204.202 MB/s
6
 
# To run for 10 s, transfer 30 GB.  So loops is 30e9 / size
7
 
for t in memcpy memset memchr strcpy strlen strcmp strchr bounce; do
8
 
    for variant in try-all try-bionic try-csl try-glibc try-newlib try-none try-plain; do
9
 
        #for size in 256 512 1024 2048 4096 8192 16384 $(seq 4 4 128); do
10
 
        for size in $(seq 4 4 128); do
11
 
            if [[ $size -le 128 ]]; then
12
 
                loops=$(( 250000000 - 1000000 * $size ))
13
 
            else
14
 
                loops=$(( 30000000000 / $size ))
15
 
            fi
16
 
            ./$variant -t $t -c $size -l $loops
17
 
        done
18
 
    done
19
 
done
20
 
250000000 - 1000000*size