Major header file rewrite and cleanup, but no new functions
[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
06ab91f0 4echo "------------------------------------------------------------- Ruby"
b84246fd 5cat print2.rb
283bc497 6echo -n "Running..."
06ab91f0 7time ./print2.rb > /dev/null
283bc497 8echo
b84246fd 9
06ab91f0 10echo "--------------------------------------------------- Python - range"
c3eef81f 11cat print2.py
283bc497 12echo -n "Running..."
06ab91f0 13time ./print2.py > /dev/null
283bc497 14echo
c3eef81f 15
06ab91f0 16echo "-------------------------------------------------- Python - xrange"
72c9d7a0 17cat xrange2.py
283bc497 18echo -n "Running..."
06ab91f0 19time ./xrange2.py > /dev/null
283bc497 20echo
72c9d7a0 21
06ab91f0 22echo "------------------------------------------------------------ PHP 5"
ba41861f 23cat echo2.php
283bc497 24echo -n "Running..."
06ab91f0 25time -f "%E total, %U user, %S sys" ./echo2.php > /dev/null
67db9ef1 26echo
27
06ab91f0 28echo "-------------------------------------------------- C - gcc - write"
67db9ef1 29cat write2.c
30echo -n "Compiling..."
06ab91f0 31time gcc -O2 write2.c -o write2
67db9ef1 32echo -n "Running..."
06ab91f0 33time ./write2 > /dev/null
283bc497 34echo
ba41861f 35
06ab91f0 36echo "---------------------------------------------- C - g++ - std::cout"
d8394559 37cat cout2.cpp
283bc497 38echo -n "Compiling..."
06ab91f0 39time g++ -O2 cout2.cpp -o cout2
283bc497 40echo -n "Running..."
06ab91f0 41time ./cout2 > /dev/null
283bc497 42echo
d8394559 43
06ab91f0 44echo "------------------------------------------------------------- Perl"
81088cec 45cat print2.pl
283bc497 46echo -n "Running..."
06ab91f0 47time -f "%E total, %U user, %S sys" ./print2.pl > /dev/null
283bc497 48echo
81088cec 49
06ab91f0 50#echo "------------------------------------------------- C - tcc - printf"
51#cat printf2.c
52#echo -n "Compiling..."
53#time tcc -O2 printf2.c -o printf2
54#echo -n "Running..."
55#time ./printf2 > /dev/null
56#echo
57#
58#echo "------------------------------------------------- C - tcc - fwrite"
59#cat fwrite2.c
60#echo -n "Compiling..."
61#time tcc -O2 fwrite2.c -o fwrite2
62#echo -n "Running..."
63#time ./fwrite2 > /dev/null
64#echo
65#
66#echo "----------------------------------------------- C<<1 - tcc - print"
67#cat cll1-print2.c
68#echo -n "Compiling..."
69#time tcc -O2 cll1-print2.c -o cll1-print2
70#echo -n "Running..."
71#time ./cll1-print2 > /dev/null
72#echo
73#
74#echo "-------------------------------------------------- C - tcc - fputs"
75#cat fputs2.c
76#echo -n "Compiling..."
77#time tcc -O2 fputs2.c -o fputs2
78#echo -n "Running..."
79#time ./fputs2 > /dev/null
80#echo
81#
82echo "------------------------------------------------- C - gcc - printf"
81088cec 83cat printf2.c
283bc497 84echo -n "Compiling..."
06ab91f0 85time gcc -O2 printf2.c -o printf2
283bc497 86echo -n "Running..."
06ab91f0 87time ./printf2 > /dev/null
283bc497 88echo
89
06ab91f0 90echo "------------------------------------------------- C - gcc - fwrite"
91cat fwrite2.c
283bc497 92echo -n "Compiling..."
06ab91f0 93time gcc -O2 fwrite2.c -o fwrite2
283bc497 94echo -n "Running..."
06ab91f0 95time ./fwrite2 > /dev/null
283bc497 96echo
81088cec 97
06ab91f0 98echo "----------------------------------------------- C<<1 - gcc - print"
99cat cll1-print2.c
283bc497 100echo -n "Compiling..."
06ab91f0 101time gcc -O2 cll1-print2.c -o cll1-print2
e1fbb836 102echo -n "Running..."
06ab91f0 103time ./cll1-print2 > /dev/null
e1fbb836 104echo
105
06ab91f0 106echo "-------------------------------------------------- C - gcc - fputs"
107cat fputs2.c
e1fbb836 108echo -n "Compiling..."
06ab91f0 109time gcc -O2 fputs2.c -o fputs2
283bc497 110echo -n "Running..."
06ab91f0 111time ./fputs2 > /dev/null
This page took 0.193511 seconds and 4 git commands to generate.