fwrite test added
[svn/Cll1h/.git] / demos / performance / test-results
CommitLineData
b84246fd 1#!/usr/bin/ruby
2
310000000.times { print "stuff","\n" }
e1fbb836 4Running...0:15.62 total, 14.06 user, 1.55 sys, 0 page faults
283bc497 5
b836e242 6#!/usr/bin/python
81088cec 7
8for i in range(1,10000000):
9 print "stuff"
10
e1fbb836 11Running...0:08.64 total, 8.43 user, 0.21 sys, 0 page faults
283bc497 12
72c9d7a0 13#!/usr/bin/python
14
15for i in xrange(1,10000000):
16 print "stuff"
17
e1fbb836 18Running...0:08.19 total, 8.17 user, 0.00 sys, 0 page faults
283bc497 19
ba41861f 20#!/usr/bin/php5 -q
21<?php
22for ( $i=0; $i<10000000; $i++ )
23{
24 echo "stuff1\n";
25}
26?>
e1fbb836 27Running...0:07.08 total, 5.00 user, 2.07 sys, 0 page faults
283bc497 28
67db9ef1 29#include <string.h>
30
31#define RUNS 10000000UL
32int main (void)
33{
34 unsigned long i;
35 char *s1="stuff\n";
36 int l1=strlen(s1);
37
38for (i=0;i<RUNS;i++)
39{
40 write(1,s1,l1);
41}
42return 0;
43}
e1fbb836 44Compiling...0:00.06 total, 0.05 user, 0.00 sys, 0 page faults
45Running...0:02.90 total, 0.90 user, 2.00 sys, 0 page faults
ba41861f 46#!/usr/bin/perl
47
48my $i=0;
49for ($i=0;$i<10000000;$i++)
50{
51 print ("stuff");
52}
53
e1fbb836 54Running...0:02.44 total, 2.44 user, 0.00 sys, 0 page faults
283bc497 55
d8394559 56#include <iostream>
57
58#define RUNS 10000000UL
59int main()
60{
61 unsigned long i;
62 for (i=0;i<RUNS;i++) {
7150dd0b 63 std::cout << "stuff\n";
d8394559 64 }
65 return 0;
66}
e1fbb836 67Compiling...0:00.37 total, 0.35 user, 0.01 sys, 0 page faults
68Running...0:00.99 total, 0.99 user, 0.00 sys, 0 page faults
283bc497 69
81088cec 70#include "cll1.h"
71
72program
73{
74 repeat(10000000)
75 print("stuff");
76}
e1fbb836 77Compiling...0:00.12 total, 0.12 user, 0.00 sys, 0 page faults
78Running...0:01.23 total, 1.23 user, 0.00 sys, 0 page faults
283bc497 79
81088cec 80#include <stdio.h>
81
82#define RUNS 10000000UL
83int main (void)
84{
85unsigned long i;
86for (i=0;i<RUNS;i++) {
87printf("stuff\n");
88}
89return 0;
90}
e1fbb836 91Compiling...0:00.05 total, 0.04 user, 0.02 sys, 0 page faults
92Running...0:00.62 total, 0.62 user, 0.00 sys, 0 page faults
283bc497 93
81088cec 94#include <stdio.h>
95
96#define RUNS 10000000UL
97int main (void)
98{
99unsigned long i;
100for (i=0;i<RUNS;i++) {
101puts("stuff");
102}
103return 0;
104}
e1fbb836 105Compiling...0:00.05 total, 0.04 user, 0.01 sys, 0 page faults
106Running...0:00.62 total, 0.62 user, 0.00 sys, 0 page faults
283bc497 107
e1fbb836 108#include <stdio.h>
109
110#define RUNS 10000000UL
111int main (void)
112{
113unsigned long i;
114for (i=0;i<RUNS;i++) {
115fputs("stuff\n",stdout);
116}
117return 0;
118}
119Compiling...0:00.06 total, 0.05 user, 0.00 sys, 0 page faults
120Running...0:00.56 total, 0.56 user, 0.00 sys, 0 page faults
121
122#include <stdio.h>
123#include <string.h>
124
125#define RUNS 10000000UL
126int main (void)
127{
128 unsigned long i;
129 char *s1="stuff\n";
130 int l1=strlen(s1);
131
132 for (i=0;i<RUNS;i++)
133 {
134 fwrite(s1,l1,1,stdout);
135 }
136 return 0;
137}
138Compiling...0:00.06 total, 0.05 user, 0.01 sys, 0 page faults
139Running...0:00.53 total, 0.53 user, 0.00 sys, 0 page faults
This page took 0.258671 seconds and 4 git commands to generate.