Tiny C test added
[svn/Cll1h/.git] / demos / performance / test-results
index 9709fc5044df8124ed531b13c7f2a73e15c46cdd..ce895562d64f1c0cdd039f22b12504a2706ee1bc 100644 (file)
@@ -1,31 +1,5 @@
-#!/usr/bin/ruby
-
-10000000.times { print "stuff","\n" }
-Running...0:15.62 total, 14.06 user, 1.55 sys, 0 page faults
-
-#!/usr/bin/python
-
-for i in range(1,10000000):
- print "stuff"
-
-Running...0:08.64 total, 8.43 user, 0.21 sys, 0 page faults
-
-#!/usr/bin/python
-
-for i in xrange(1,10000000):
- print "stuff"
-
-Running...0:08.19 total, 8.17 user, 0.00 sys, 0 page faults
-
-#!/usr/bin/php5 -q
-<?php
-for ( $i=0; $i<10000000; $i++ )
-{
- echo "stuff1\n";
-}
-?>
-Running...0:07.08 total, 5.00 user, 2.07 sys, 0 page faults
-
+AMD Athlon(tm) XP 1259.487 Mhz 2522.30 bogomips
+-------------------------------------------------- C - gcc - write
 #include <string.h>
 
 #define RUNS 10000000UL
@@ -35,14 +9,21 @@ int main (void)
  char *s1="stuff\n";
  int l1=strlen(s1);
 
-for (i=0;i<RUNS;i++)
-{
- write(1,s1,l1);
-}
-return 0;
+ for (i=0;i<RUNS;i++)
+ {
 write(1,s1,l1);
+ }
+ return 0;
 }
-Compiling...0:00.06 total, 0.05 user, 0.00 sys, 0 page faults
-Running...0:02.90 total, 0.90 user, 2.00 sys, 0 page faults
+Compiling...
+real   0m1.102s
+user   0m0.212s
+sys    0m0.044s
+Running...
+real   0m7.171s
+user   0m1.636s
+sys    0m5.536s
+------------------------------------------------------------- Perl
 #!/usr/bin/perl
 
 my $i=0;
@@ -51,22 +32,48 @@ for ($i=0;$i<10000000;$i++)
  print ("stuff");
 }
 
-Running...0:02.44 total, 2.44 user, 0.00 sys, 0 page faults
+Running...
+real   0m5.808s
+user   0m5.600s
+sys    0m0.012s
+----------------------------------------------- C<<1 - gcc - print
+#include "cll1.h"
 
+program
+{
+ repeat(10000000)
+  print("stuff");
+}
+Compiling...
+real   0m0.567s
+user   0m0.352s
+sys    0m0.028s
+Running...
+real   0m2.122s
+user   0m2.112s
+sys    0m0.008s
+---------------------------------------------- C - g++ - std::cout
 #include <iostream>
 
 #define RUNS 10000000UL
 int main()
 {
  unsigned long i;
- for (i=0;i<RUNS;i++) {
- std::cout << "stuff\n";
+ for (i=0;i<RUNS;i++) 
+ {
+  std::cout << "stuff\n";
  }
  return 0;
 }
-Compiling...0:00.37 total, 0.35 user, 0.01 sys, 0 page faults
-Running...0:00.99 total, 0.99 user, 0.00 sys, 0 page faults
-
+Compiling...
+real   0m1.973s
+user   0m1.016s
+sys    0m0.100s
+Running...
+real   0m1.763s
+user   0m1.752s
+sys    0m0.012s
+----------------------------------------------- C<<1 - tcc - print
 #include "cll1.h"
 
 program
@@ -74,51 +81,179 @@ program
  repeat(10000000)
   print("stuff");
 }
-Compiling...0:00.12 total, 0.12 user, 0.00 sys, 0 page faults
-Running...0:01.23 total, 1.23 user, 0.00 sys, 0 page faults
-
+Compiling...
+real   0m0.148s
+user   0m0.020s
+sys    0m0.008s
+Running...
+real   0m2.259s
+user   0m2.252s
+sys    0m0.008s
+------------------------------------------------- C - tcc - printf
 #include <stdio.h>
 
 #define RUNS 10000000UL
 int main (void)
 {
-unsigned long i;
-for (i=0;i<RUNS;i++) {
-printf("stuff\n");
+ unsigned long i;
+ for (i=0;i<RUNS;i++) 
+ {
+  printf("stuff\n");
+ }
+ return 0;
 }
-return 0;
+Compiling...
+real   0m0.032s
+user   0m0.004s
+sys    0m0.008s
+Running...
+real   0m1.924s
+user   0m1.924s
+sys    0m0.000s
+------------------------------------------------ C<<1 - tcc - echo
+#include "cll1.h"
+
+program
+{
+ unsigned long i;
+ for_range(i,1,10000000)
+  echo("stuff\n");
 }
-Compiling...0:00.05 total, 0.04 user, 0.02 sys, 0 page faults
-Running...0:00.62 total, 0.62 user, 0.00 sys, 0 page faults
+Compiling...
+real   0m0.021s
+user   0m0.016s
+sys    0m0.004s
+Running...
+real   0m1.109s
+user   0m1.104s
+sys    0m0.008s
+--------------------------------------------------- C - tcc - puts
+#include <stdio.h>
 
+#define RUNS 10000000UL
+int main (void)
+{
+ unsigned long i;
+ for (i=0;i<RUNS;i++) 
+ {
+  puts("stuff"); 
+ }
+ return 0;
+}
+Compiling...
+real   0m0.014s
+user   0m0.008s
+sys    0m0.008s
+Running...
+real   0m1.152s
+user   0m1.144s
+sys    0m0.008s
+------------------------------------------------- C - tcc - fwrite
 #include <stdio.h>
+#include <string.h>
 
 #define RUNS 10000000UL
 int main (void)
 {
-unsigned long i;
-for (i=0;i<RUNS;i++) {
-puts("stuff"); 
+ unsigned long i;
+ char *s1="stuff\n";
+ int l1=strlen(s1);
+
+ for (i=0;i<RUNS;i++)
+ {
+  fwrite(s1,l1,1,stdout);
+ }
+ return 0;
 }
-return 0;
+Compiling...
+real   0m0.013s
+user   0m0.012s
+sys    0m0.000s
+Running...
+real   0m1.048s
+user   0m1.032s
+sys    0m0.016s
+-------------------------------------------------- C - tcc - fputs
+#include <stdio.h>
+
+#define RUNS 10000000UL
+int main (void)
+{
+ unsigned long i;
+ for (i=0;i<RUNS;i++) 
+ {
+  fputs("stuff\n",stdout);
+ }
+ return 0;
 }
-Compiling...0:00.05 total, 0.04 user, 0.01 sys, 0 page faults
-Running...0:00.62 total, 0.62 user, 0.00 sys, 0 page faults
+Compiling...
+real   0m0.012s
+user   0m0.012s
+sys    0m0.000s
+Running...
+real   0m1.152s
+user   0m1.144s
+sys    0m0.008s
+------------------------------------------------ C<<1 - gcc - echo
+#include "cll1.h"
 
+program
+{
+ unsigned long i;
+ for_range(i,1,10000000)
+  echo("stuff\n");
+}
+Compiling...
+real   0m0.351s
+user   0m0.308s
+sys    0m0.040s
+Running...
+real   0m1.243s
+user   0m1.236s
+sys    0m0.008s
+------------------------------------------------- C - gcc - printf
 #include <stdio.h>
 
 #define RUNS 10000000UL
 int main (void)
 {
-unsigned long i;
-for (i=0;i<RUNS;i++) {
-fputs("stuff\n",stdout);
-}
-return 0;
+ unsigned long i;
+ for (i=0;i<RUNS;i++) 
+ {
+  printf("stuff\n");
+ }
+ return 0;
 }
-Compiling...0:00.06 total, 0.05 user, 0.00 sys, 0 page faults
-Running...0:00.56 total, 0.56 user, 0.00 sys, 0 page faults
+Compiling...
+real   0m0.196s
+user   0m0.164s
+sys    0m0.032s
+Running...
+real   0m1.106s
+user   0m1.104s
+sys    0m0.004s
+--------------------------------------------------- C - gcc - puts
+#include <stdio.h>
 
+#define RUNS 10000000UL
+int main (void)
+{
+ unsigned long i;
+ for (i=0;i<RUNS;i++) 
+ {
+  puts("stuff"); 
+ }
+ return 0;
+}
+Compiling...
+real   0m0.197s
+user   0m0.172s
+sys    0m0.028s
+Running...
+real   0m1.105s
+user   0m1.084s
+sys    0m0.020s
+------------------------------------------------- C - gcc - fwrite
 #include <stdio.h>
 #include <string.h>
 
@@ -135,5 +270,32 @@ int main (void)
  }
  return 0;
 }
-Compiling...0:00.06 total, 0.05 user, 0.01 sys, 0 page faults
-Running...0:00.53 total, 0.53 user, 0.00 sys, 0 page faults
+Compiling...
+real   0m0.216s
+user   0m0.188s
+sys    0m0.028s
+Running...
+real   0m1.027s
+user   0m1.012s
+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("stuff\n",stdout);
+ }
+ return 0;
+}
+Compiling...
+real   0m0.199s
+user   0m0.152s
+sys    0m0.048s
+Running...
+real   0m1.023s
+user   0m1.008s
+sys    0m0.016s
This page took 0.152191 seconds and 4 git commands to generate.