binary B+ tree - first attempt, compiles and runs
[svn/Cll1h/.git] / demos / performance / test-performance2.sh
CommitLineData
06ab91f0 1#!/bin/bash
bce4b05d 2echo `grep "model name" /proc/cpuinfo |cut -f 2 -d :` `grep "cpu MHz" /proc/cpuinfo |cut -f 2 -d :` Mhz ` grep "bogomips" /proc/cpuinfo |cut -f 2 -d :` bogomips
81088cec 3
2814fb59 4if [ "$1" == "all" ]
5then
6 echo "------------------------------------------------------------- Ruby"
7 cat print2.rb
8 echo -n "Running..."
9 time ./print2.rb > /dev/null
10 echo
b84246fd 11
2814fb59 12 echo "--------------------------------------------------- Python - range"
13 cat print2.py
14 echo -n "Running..."
15 time ./print2.py > /dev/null
16 echo
c3eef81f 17
2814fb59 18 echo "-------------------------------------------------- Python - xrange"
19 cat xrange2.py
20 echo -n "Running..."
21 time ./xrange2.py > /dev/null
22 echo
72c9d7a0 23
2814fb59 24 echo "------------------------------------------------------------ PHP 5"
25 cat echo2.php
26 echo -n "Running..."
27 time ./echo2.php > /dev/null
28 echo
29fi
67db9ef1 30
06ab91f0 31echo "-------------------------------------------------- C - gcc - write"
67db9ef1 32cat write2.c
33echo -n "Compiling..."
06ab91f0 34time gcc -O2 write2.c -o write2
67db9ef1 35echo -n "Running..."
06ab91f0 36time ./write2 > /dev/null
283bc497 37echo
ba41861f 38
06ab91f0 39echo "---------------------------------------------- C - g++ - std::cout"
d8394559 40cat cout2.cpp
283bc497 41echo -n "Compiling..."
06ab91f0 42time g++ -O2 cout2.cpp -o cout2
283bc497 43echo -n "Running..."
06ab91f0 44time ./cout2 > /dev/null
283bc497 45echo
d8394559 46
06ab91f0 47echo "------------------------------------------------------------- Perl"
81088cec 48cat print2.pl
283bc497 49echo -n "Running..."
2814fb59 50time ./print2.pl > /dev/null
51echo
52
53echo "------------------------------------------------- C - tcc - printf"
54cat printf2.c
55echo -n "Compiling..."
56time tcc printf2.c -o printf2
57echo -n "Running..."
58time ./printf2 > /dev/null
59echo
60
61echo "------------------------------------------------- C - tcc - fwrite"
62cat fwrite2.c
63echo -n "Compiling..."
64time tcc fwrite2.c -o fwrite2
65echo -n "Running..."
66time ./fwrite2 > /dev/null
67echo
68
69echo "----------------------------------------------- C<<1 - tcc - print"
70cat cll1-print2.c
71echo -n "Compiling..."
72time tcc cll1-print2.c -o cll1-print2
73echo -n "Running..."
74time ./cll1-print2 > /dev/null
75echo
76
77echo "-------------------------------------------------- C - tcc - fputs"
78cat fputs2.c
79echo -n "Compiling..."
80time tcc fputs2.c -o fputs2
81echo -n "Running..."
82time ./fputs2 > /dev/null
283bc497 83echo
81088cec 84
06ab91f0 85echo "------------------------------------------------- C - gcc - printf"
81088cec 86cat printf2.c
283bc497 87echo -n "Compiling..."
06ab91f0 88time gcc -O2 printf2.c -o printf2
283bc497 89echo -n "Running..."
06ab91f0 90time ./printf2 > /dev/null
283bc497 91echo
92
06ab91f0 93echo "------------------------------------------------- C - gcc - fwrite"
94cat fwrite2.c
283bc497 95echo -n "Compiling..."
06ab91f0 96time gcc -O2 fwrite2.c -o fwrite2
283bc497 97echo -n "Running..."
06ab91f0 98time ./fwrite2 > /dev/null
283bc497 99echo
81088cec 100
06ab91f0 101echo "----------------------------------------------- C<<1 - gcc - print"
102cat cll1-print2.c
283bc497 103echo -n "Compiling..."
06ab91f0 104time gcc -O2 cll1-print2.c -o cll1-print2
e1fbb836 105echo -n "Running..."
06ab91f0 106time ./cll1-print2 > /dev/null
e1fbb836 107echo
108
06ab91f0 109echo "-------------------------------------------------- C - gcc - fputs"
110cat fputs2.c
e1fbb836 111echo -n "Compiling..."
06ab91f0 112time gcc -O2 fputs2.c -o fputs2
283bc497 113echo -n "Running..."
06ab91f0 114time ./fputs2 > /dev/null
This page took 0.317473 seconds and 4 git commands to generate.