X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=demos%2Fperformance%2Ftest-results2;h=be620a2ca45b8635a1ff4783c46d954bd1f99527;hb=93583418508acf4635f5d2064f627909c56e29c2;hp=ea395b5de8ab1190fd3c37c9defc59891b54a4fb;hpb=67db9ef19d8b36eb84357b6e6477b7791b59182f;p=svn%2FCll1h%2F.git diff --git a/demos/performance/test-results2 b/demos/performance/test-results2 index ea395b5..be620a2 100644 --- a/demos/performance/test-results2 +++ b/demos/performance/test-results2 @@ -1,32 +1,5 @@ -#!/usr/bin/ruby - -10000000.times { print "stuff1"," ","stuff2","\n" } -Running...0:24.57 total, 23.03 user, 1.51 sys, 0 outputs - -#!/usr/bin/python - -for i in range(1,10000000): - print "stuff1","stuff2" - -Running...0:13.80 total, 13.53 user, 0.17 sys, 0 outputs - -#!/usr/bin/python - -for i in xrange(1,10000000): - print "stuff1","stuff2" - -Running...0:13.43 total, 13.20 user, 0.02 sys, 0 outputs - -#!/usr/bin/php5 -q - -Running...0:11.93 total, 9.84 user, 2.08 sys, 0 outputs - -#include +AMD Athlon(tm) XP 1259.487 Mhz 2522.30 bogomips +-------------------------------------------------- C - gcc - write #include #define RUNS 10000000UL @@ -47,9 +20,16 @@ int main (void) } return 0; } -Compiling...0:00.07 total, 0.06 user, 0.00 sys, 0 outputs -Running...0:11.92 total, 3.78 user, 7.86 sys, 0 outputs - +Compiling... +real 0m0.205s +user 0m0.172s +sys 0m0.032s +Running... +real 0m28.001s +user 0m6.400s +sys 0m21.597s + +---------------------------------------------- C - g++ - std::cout #include #define RUNS 10000000UL @@ -61,9 +41,16 @@ int main() } return 0; } -Compiling...0:00.38 total, 0.33 user, 0.05 sys, 0 outputs -Running...0:08.22 total, 6.18 user, 2.01 sys, 0 outputs - +Compiling... +real 0m1.087s +user 0m0.988s +sys 0m0.100s +Running... +real 0m15.557s +user 0m10.461s +sys 0m5.096s + +------------------------------------------------------------- Perl #!/usr/bin/perl my $i=0; @@ -71,22 +58,65 @@ for ($i=0;$i<10000000;$i++) { print ("stuff1"," ","stuff2","\n"); } -Running...0:05.97 total, 5.96 user, 0.00 sys, 0 outputs +Running... +real 0m10.660s +user 0m10.361s +sys 0m0.028s +------------------------------------------------- C - tcc - printf #include #define RUNS 10000000UL int main (void) { unsigned long i; - for (i=0;i +#include +#define RUNS 10000000UL +int main (void) +{ + unsigned long i; + char *s1="stuff1"; + char *s2="stuff2"; + int l1=strlen(s1); + int l2=strlen(s2); + + for (i=0;i #define RUNS 10000000UL @@ -111,6 +148,105 @@ int main (void) } return 0; } -Compiling...0:00.07 total, 0.04 user, 0.02 sys, 0 outputs -Running...0:01.52 total, 1.52 user, 0.00 sys, 0 outputs +Compiling... +real 0m0.012s +user 0m0.008s +sys 0m0.004s +Running... +real 0m4.614s +user 0m4.596s +sys 0m0.020s + +------------------------------------------------- C - gcc - printf +#include +#define RUNS 10000000UL +int main (void) +{ + unsigned long i; + for (i=0;i +#include + +#define RUNS 10000000UL +int main (void) +{ + unsigned long i; + char *s1="stuff1"; + char *s2="stuff2"; + int l1=strlen(s1); + int l2=strlen(s2); + + for (i=0;i + +#define RUNS 10000000UL +int main (void) +{ + unsigned long i; + for (i=0;i