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