updated test results
[svn/Cll1h/.git] / demos / performance / test-results2
index ea395b5de8ab1190fd3c37c9defc59891b54a4fb..5d981a9374b5376a62bf5c6393b3a0f6a904e89c 100644 (file)
@@ -1,22 +1,37 @@
+AMD Athlon(tm) XP 1259.392 Mhz 2520.58 bogomips
+------------------------------------------------------------- Ruby
 #!/usr/bin/ruby
 
 10000000.times { print "stuff1"," ","stuff2","\n" }
-Running...0:24.57 total, 23.03 user, 1.51 sys, 0 outputs
 
+Running...
+real   0m50.940s
+user   0m49.107s
+sys    0m1.836s
+
+--------------------------------------------------- Python - range
 #!/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
+Running...
+real   0m25.547s
+user   0m25.230s
+sys    0m0.320s
 
+-------------------------------------------------- Python - xrange
 #!/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
+Running...
+real   0m26.269s
+user   0m26.254s
+sys    0m0.016s
 
+------------------------------------------------------------ PHP 5
 #!/usr/bin/php5 -q
 <?php 
 for ( $i=0; $i<10000000; $i++ )
@@ -24,9 +39,12 @@ for ( $i=0; $i<10000000; $i++ )
  echo "stuff1"." "."stuff2"."\n";
 }
 ?>
-Running...0:11.93 total, 9.84 user, 2.08 sys, 0 outputs
+Running...
+real   0m18.649s
+user   0m14.449s
+sys    0m4.200s
 
-#include <stdio.h>
+-------------------------------------------------- C - gcc - write
 #include <string.h>
 
 #define RUNS 10000000UL
@@ -47,9 +65,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.188s
+user   0m0.164s
+sys    0m0.024s
+Running...
+real   0m21.353s
+user   0m7.572s
+sys    0m13.781s
 
+---------------------------------------------- C - g++ - std::cout
 #include <iostream>
 
 #define RUNS 10000000UL
@@ -61,9 +86,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   0m0.986s
+user   0m0.904s
+sys    0m0.080s
+Running...
+real   0m14.836s
+user   0m10.425s
+sys    0m4.416s
 
+------------------------------------------------------------- Perl
 #!/usr/bin/perl
 
 my $i=0;
@@ -71,22 +103,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   0m14.115s
+user   0m13.005s
+sys    0m0.012s
 
+------------------------------------------------- C - tcc - printf
 #include <stdio.h>
 
 #define RUNS 10000000UL
 int main (void)
 {
  unsigned long i;
- for (i=0;i<RUNS;i++) {
+ for (i=0;i<RUNS;i++) 
+ {
   printf("%s %s\n","stuff2","stuff2");
  }
  return 0;
 }
-Compiling...0:00.06 total, 0.05 user, 0.00 sys, 0 outputs
-Running...0:02.87 total, 2.84 user, 0.01 sys, 0 outputs
+Compiling...
+real   0m0.012s
+user   0m0.008s
+sys    0m0.004s
+Running...
+real   0m4.987s
+user   0m4.856s
+sys    0m0.032s
+
+------------------------------------------------- C - tcc - fwrite
+#include <stdio.h>
+#include <string.h>
+
+#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<RUNS;i++) 
+ {
+  fwrite(s1,l1,1,stdout);
+  fwrite(" ",1,1,stdout);
+  fwrite(s2,l2,1,stdout);
+  fwrite("\n",1,1,stdout);
+ }
+ return 0;
+}
+Compiling...
+real   0m0.017s
+user   0m0.012s
+sys    0m0.004s
+Running...
+real   0m3.678s
+user   0m3.672s
+sys    0m0.004s
 
+----------------------------------------------- C<<1 - tcc - print
 #include "cll1.h"
 
 program
@@ -94,9 +169,16 @@ program
  repeat(10000000)
   print("stuff1","stuff2");
 }
-Compiling...0:00.14 total, 0.12 user, 0.00 sys, 0 outputs
-Running...0:02.77 total, 2.76 user, 0.00 sys, 0 outputs
+Compiling...
+real   0m0.022s
+user   0m0.016s
+sys    0m0.004s
+Running...
+real   0m4.853s
+user   0m4.836s
+sys    0m0.016s
 
+-------------------------------------------------- C - tcc - fputs
 #include <stdio.h>
 
 #define RUNS 10000000UL
@@ -111,6 +193,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.065s
+user   0m4.040s
+sys    0m0.024s
+
+------------------------------------------------- C - gcc - printf
+#include <stdio.h>
+
+#define RUNS 10000000UL
+int main (void)
+{
+ unsigned long i;
+ for (i=0;i<RUNS;i++) 
+ {
+  printf("%s %s\n","stuff2","stuff2");
+ }
+ return 0;
+}
+Compiling...
+real   0m0.180s
+user   0m0.152s
+sys    0m0.028s
+Running...
+real   0m4.877s
+user   0m4.860s
+sys    0m0.020s
+
+------------------------------------------------- C - gcc - fwrite
+#include <stdio.h>
+#include <string.h>
+
+#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<RUNS;i++) 
+ {
+  fwrite(s1,l1,1,stdout);
+  fwrite(" ",1,1,stdout);
+  fwrite(s2,l2,1,stdout);
+  fwrite("\n",1,1,stdout);
+ }
+ return 0;
+}
+Compiling...
+real   0m0.205s
+user   0m0.156s
+sys    0m0.048s
+Running...
+real   0m3.640s
+user   0m3.620s
+sys    0m0.020s
+
+----------------------------------------------- C<<1 - gcc - print
+#include "cll1.h"
+
+program
+{
+ repeat(10000000)
+  print("stuff1","stuff2");
+}
+Compiling...
+real   0m0.378s
+user   0m0.336s
+sys    0m0.040s
+Running...
+real   0m4.457s
+user   0m4.448s
+sys    0m0.012s
 
+-------------------------------------------------- C - gcc - fputs
+#include <stdio.h>
+
+#define RUNS 10000000UL
+int main (void)
+{
+ unsigned long i;
+ for (i=0;i<RUNS;i++) {
+  fputs("stuff1",stdout);
+  fputs(" ",stdout);
+  fputs("stuff2",stdout);
+  fputs("\n",stdout);
+ }
+ return 0;
+}
+Compiling...
+real   0m0.190s
+user   0m0.172s
+sys    0m0.020s
+Running...
+real   0m2.556s
+user   0m2.544s
+sys    0m0.012s
This page took 0.132748 seconds and 4 git commands to generate.