File: shootout.sh

package info (click to toggle)
simdjson 4.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,936 kB
  • sloc: cpp: 171,612; ansic: 19,122; sh: 1,126; python: 842; makefile: 47; ruby: 25; javascript: 13
file content (32 lines) | stat: -rw-r--r-- 833 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function report_perf() {
    algorithm=$1
    architecture=$2
    iterations=$3
    for run in {1..2}
    do
        echo -n "| $architecture | $algorithm "
        for file in "${@:4}"
        do
            ./parse -f $EXTRAARGS -n $iterations jsonexamples/$file.json | grep "stage 1 instructions" | sed -E "s/^.*stage 1 instructions:\s*([0-9]+)\s+cycles:\s*([0-9]+).+mis. branches:\s*([0-9]+).*/| \2 | \1 | \3 /" | tr -d "\n"
        done
        echo "|"
    done
}
echo -n "| Architecture | Algorithm "
for file in "${@:3}"
do
    echo -n "| $file Cycles | $file Instructions | $file Missed Branches "
done
echo "|"

git checkout jkeiser/lookup2_simpler_intel
make parse
report_perf lookup2 "$@"

git checkout jkeiser/lookup2
make parse
report_perf lookup2_old "$@"

git checkout master
make parse
report_perf fastvalidate "$@"