cat cout.cpp
echo "Compiling..."
-time g++ -O4 cout.cpp -o cout
+time g++ -O2 cout.cpp -o cout
echo "Running..."
time ./cout > /dev/null
cat cll1-print.c
echo "Compiling..."
-time gcc -O4 cll1-print.c -o cll1-print
+time gcc -O2 cll1-print.c -o cll1-print
echo "Running..."
time ./cll1-print > /dev/null
cat printf.c
echo "Compiling..."
-time gcc -O4 printf.c -o printf
+time gcc -O2 printf.c -o printf
echo "Running..."
time ./printf > /dev/null
cat puts.c
echo "Compiling..."
-time gcc -O4 puts.c -o puts
+time gcc -O2 puts.c -o puts
echo "Running..."
time ./puts > /dev/null
cat fputs.c
echo "Compiling..."
-time gcc -O4 fputs.c -o fputs
+time gcc -O2 fputs.c -o fputs
echo "Running..."
time ./fputs > /dev/null
cat cout2.cpp
echo "Compiling..."
-time g++ -O4 cout2.cpp -o cout2
+time g++ -O2 cout2.cpp -o cout2
echo "Running..."
time ./cout2 > /dev/null
cat cll1-print2.c
echo "Compiling..."
-time gcc -O4 cll1-print2.c -o cll1-print2
+time gcc -O2 cll1-print2.c -o cll1-print2
echo "Running..."
time ./cll1-print2 > /dev/null
cat printf2.c
echo "Compiling..."
-time gcc -O4 printf2.c -o printf2
+time gcc -O2 printf2.c -o printf2
echo "Running..."
time ./printf2 > /dev/null
cat fputs2.c
echo "Compiling..."
-time gcc -O4 fputs2.c -o fputs2
+time gcc -O2 fputs2.c -o fputs2
echo "Running..."
time ./fputs2 > /dev/null
10000000.times { print "stuff","\n" }
Running...
-14.60user 1.64system 0:16.50elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+457minor)pagefaults 0swaps
+14.52user 1.60system 0:16.15elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+456minor)pagefaults 0swaps
#!/usr/bin/python
for i in range(1,10000000):
print "stuff"
Running...
-8.48user 0.17system 0:08.75elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
+8.61user 0.16system 0:08.78elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+39997minor)pagefaults 0swaps
#include <iostream>
return 0;
}
Compiling...
-0.33user 0.04system 0:00.38elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+8821minor)pagefaults 0swaps
+0.34user 0.02system 0:00.36elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+8698minor)pagefaults 0swaps
Running...
-3.71user 2.04system 0:05.82elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+240minor)pagefaults 0swaps
+3.81user 1.90system 0:05.72elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+241minor)pagefaults 0swaps
#!/usr/bin/perl
my $i=0;
}
Running...
-2.52user 0.00system 0:02.53elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+2.51user 0.00system 0:02.51elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+424minor)pagefaults 0swaps
#include "cll1.h"
print("stuff");
}
Compiling...
-0.08user 0.01system 0:00.09elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+4014minor)pagefaults 0swaps
+0.08user 0.01system 0:00.09elapsed 103%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+3999minor)pagefaults 0swaps
Running...
-0.84user 0.00system 0:00.85elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0.88user 0.00system 0:00.89elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+130minor)pagefaults 0swaps
#include <stdio.h>
return 0;
}
Compiling...
-0.04user 0.02system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k
+0.04user 0.01system 0:00.05elapsed 94%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3781minor)pagefaults 0swaps
Running...
-0.62user 0.00system 0:00.63elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+114minor)pagefaults 0swaps
+0.62user 0.00system 0:00.61elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+116minor)pagefaults 0swaps
#include <stdio.h>
#define RUNS 10000000UL
return 0;
}
Compiling...
-0.04user 0.01system 0:00.06elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+3779minor)pagefaults 0swaps
+0.05user 0.00system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+3781minor)pagefaults 0swaps
Running...
-0.62user 0.01system 0:00.63elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0.60user 0.00system 0:00.61elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+115minor)pagefaults 0swaps
#include <stdio.h>
return 0;
}
Compiling...
-0.05user 0.00system 0:00.19elapsed 33%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+3787minor)pagefaults 0swaps
+0.05user 0.00system 0:00.06elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+3785minor)pagefaults 0swaps
Running...
-0.57user 0.00system 0:00.57elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+115minor)pagefaults 0swaps
+0.56user 0.00system 0:00.57elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+114minor)pagefaults 0swaps
10000000.times { print "stuff1"," ","stuff2","\n" }
Running...
-22.60user 1.51system 0:24.13elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+456minor)pagefaults 0swaps
+23.37user 1.62system 0:25.02elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+457minor)pagefaults 0swaps
#!/usr/bin/python
for i in range(1,10000000):
print "stuff1","stuff2"
Running...
-13.40user 0.16system 0:13.56elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+39997minor)pagefaults 0swaps
+13.56user 0.17system 0:13.76elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+39996minor)pagefaults 0swaps
#include <iostream>
#define RUNS 10000000UL
return 0;
}
Compiling...
-0.32user 0.04system 0:00.37elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+8824minor)pagefaults 0swaps
+0.32user 0.04system 0:00.37elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+8700minor)pagefaults 0swaps
Running...
-6.41user 1.94system 0:08.37elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+241minor)pagefaults 0swaps
+5.93user 2.16system 0:08.10elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+240minor)pagefaults 0swaps
#!/usr/bin/perl
my $i=0;
print ("stuff1"," ","stuff2","\n");
}
Running...
-5.66user 0.00system 0:05.67elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
+5.68user 0.00system 0:05.68elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+425minor)pagefaults 0swaps
#include "cll1.h"
print("stuff1","stuff2");
}
Compiling...
-0.07user 0.02system 0:00.10elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+4010minor)pagefaults 0swaps
+0.08user 0.01system 0:00.09elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+3999minor)pagefaults 0swaps
Running...
-1.82user 0.00system 0:01.82elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+130minor)pagefaults 0swaps
+1.90user 0.00system 0:01.90elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+132minor)pagefaults 0swaps
#include <stdio.h>
#define RUNS 10000000UL
return 0;
}
Compiling...
-0.04user 0.02system 0:00.05elapsed 101%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+3783minor)pagefaults 0swaps
+0.04user 0.02system 0:00.06elapsed 104%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+3784minor)pagefaults 0swaps
Running...
-2.84user 0.00system 0:02.85elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
+2.87user 0.00system 0:02.88elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+122minor)pagefaults 0swaps
#include <stdio.h>
return 0;
}
Compiling...
-0.05user 0.00system 0:00.06elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0.05user 0.01system 0:00.12elapsed 52%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3790minor)pagefaults 0swaps
Running...
-1.54user 0.00system 0:01.54elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
-0inputs+0outputs (0major+115minor)pagefaults 0swaps
+1.50user 0.01system 0:01.51elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
+0inputs+0outputs (0major+116minor)pagefaults 0swaps