binary B+ tree - first attempt, compiles and runs
[svn/Cll1h/.git] / demos / performance / test-performance.sh
... / ...
CommitLineData
1#!/bin/bash
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
3
4if [ "$1" == "all" ]
5then
6 echo "------------------------------------------------------------- Ruby"
7 cat print.rb
8 echo -n "Running..."
9 time ./print.rb > /dev/null
10
11 echo "--------------------------------------------------- Python - range"
12 cat print.py
13 echo -n "Running..."
14 time ./print.py > /dev/null
15
16 echo "-------------------------------------------------- Python - xrange"
17 cat xrange.py
18 echo -n "Running..."
19 time ./xrange.py > /dev/null
20
21 echo "------------------------------------------------------------ PHP 5"
22 cat echo.php
23 echo -n "Running..."
24 time ./echo.php > /dev/null
25fi
26
27echo "-------------------------------------------------- C - gcc - write"
28cat write.c
29echo -n "Compiling..."
30time gcc -O2 write.c -o write
31echo -n "Running..."
32time ./write > /dev/null
33
34echo "------------------------------------------------------------- Perl"
35cat print.pl
36echo -n "Running..."
37time ./print.pl > /dev/null
38
39echo "----------------------------------------------- C<<1 - gcc - print"
40cat cll1-print.c
41echo -n "Compiling..."
42time gcc -O2 cll1-print.c -o cll1-print
43echo -n "Running..."
44time ./cll1-print > /dev/null
45
46echo "---------------------------------------------- C - g++ - std::cout"
47cat cout.cpp
48echo -n "Compiling..."
49time g++ -O2 cout.cpp -o cout
50echo -n "Running..."
51time ./cout > /dev/null
52
53echo "----------------------------------------------- C<<1 - tcc - print"
54cat cll1-print.c
55echo -n "Compiling..."
56time tcc cll1-print.c -o cll1-print
57echo -n "Running..."
58time ./cll1-print > /dev/null
59
60echo "------------------------------------------------- C - tcc - printf"
61cat printf.c
62echo -n "Compiling..."
63time tcc printf.c -o printf
64echo -n "Running..."
65time ./printf > /dev/null
66
67echo "------------------------------------------------ C<<1 - tcc - echo"
68cat cll1-echo.c
69echo -n "Compiling..."
70time tcc cll1-echo.c -o cll1-echo
71echo -n "Running..."
72time ./cll1-echo > /dev/null
73
74echo "--------------------------------------------------- C - tcc - puts"
75cat puts.c
76echo -n "Compiling..."
77time tcc puts.c -o puts
78echo -n "Running..."
79time ./puts > /dev/null
80
81echo "------------------------------------------------- C - tcc - fwrite"
82cat fwrite.c
83echo -n "Compiling..."
84time tcc fwrite.c -o fwrite
85echo -n "Running..."
86time ./fwrite > /dev/null
87
88echo "-------------------------------------------------- C - tcc - fputs"
89cat fputs.c
90echo -n "Compiling..."
91time tcc fputs.c -o fputs
92echo -n "Running..."
93time ./fputs > /dev/null
94
95echo "------------------------------------------------ C<<1 - gcc - echo"
96cat cll1-echo.c
97echo -n "Compiling..."
98time gcc -O2 cll1-echo.c -o cll1-echo
99echo -n "Running..."
100time ./cll1-echo > /dev/null
101
102echo "------------------------------------------------- C - gcc - printf"
103cat printf.c
104echo -n "Compiling..."
105time gcc -O2 printf.c -o printf
106echo -n "Running..."
107time ./printf > /dev/null
108
109echo "--------------------------------------------------- C - gcc - puts"
110cat puts.c
111echo -n "Compiling..."
112time gcc -O2 puts.c -o puts
113echo -n "Running..."
114time ./puts > /dev/null
115
116echo "------------------------------------------------- C - gcc - fwrite"
117cat fwrite.c
118echo -n "Compiling..."
119time gcc -O2 fwrite.c -o fwrite
120echo -n "Running..."
121time ./fwrite > /dev/null
122
123echo "-------------------------------------------------- C - gcc - fputs"
124cat fputs.c
125echo -n "Compiling..."
126time gcc -O2 fputs.c -o fputs
127echo -n "Running..."
128time ./fputs > /dev/null
129
This page took 0.124984 seconds and 4 git commands to generate.