#3 FINALY !!! objects-wiki.c compiles (with -Wall) and runs !
[svn/Cll1h/.git] / demos / performance / test-results2
... / ...
CommitLineData
1AMD Athlon(tm) XP 1259.392 Mhz 2520.58 bogomips
2------------------------------------------------------------- Ruby
3#!/usr/bin/ruby
4
510000000.times { print "stuff1"," ","stuff2","\n" }
6
7Running...
8real 0m50.940s
9user 0m49.107s
10sys 0m1.836s
11
12--------------------------------------------------- Python - range
13#!/usr/bin/python
14
15for i in range(1,10000000):
16 print "stuff1","stuff2"
17
18Running...
19real 0m25.547s
20user 0m25.230s
21sys 0m0.320s
22
23-------------------------------------------------- Python - xrange
24#!/usr/bin/python
25
26for i in xrange(1,10000000):
27 print "stuff1","stuff2"
28
29Running...
30real 0m26.269s
31user 0m26.254s
32sys 0m0.016s
33
34------------------------------------------------------------ PHP 5
35#!/usr/bin/php5 -q
36<?php
37for ( $i=0; $i<10000000; $i++ )
38{
39 echo "stuff1"." "."stuff2"."\n";
40}
41?>
42Running...
43real 0m18.649s
44user 0m14.449s
45sys 0m4.200s
46
47-------------------------------------------------- C - gcc - write
48#include <string.h>
49
50#define RUNS 10000000UL
51int main (void)
52{
53 unsigned long i;
54 char *s1="stuff1";
55 char *s2="stuff2";
56 int l1=strlen(s1);
57 int l2=strlen(s2);
58
59 for (i=0;i<RUNS;i++)
60 {
61 write(1,s1,l1);
62 write(1," ",1);
63 write(1,s2,l2);
64 write(1,"\n",1);
65 }
66 return 0;
67}
68Compiling...
69real 0m0.188s
70user 0m0.164s
71sys 0m0.024s
72Running...
73real 0m21.353s
74user 0m7.572s
75sys 0m13.781s
76
77---------------------------------------------- C - g++ - std::cout
78#include <iostream>
79
80#define RUNS 10000000UL
81int main()
82{
83 unsigned long i;
84 for (i=0;i<RUNS;i++) {
85 std::cout << "stuff1" << " " << "stuff2" << std::endl;
86 }
87 return 0;
88}
89Compiling...
90real 0m0.986s
91user 0m0.904s
92sys 0m0.080s
93Running...
94real 0m14.836s
95user 0m10.425s
96sys 0m4.416s
97
98------------------------------------------------------------- Perl
99#!/usr/bin/perl
100
101my $i=0;
102for ($i=0;$i<10000000;$i++)
103{
104 print ("stuff1"," ","stuff2","\n");
105}
106Running...
107real 0m14.115s
108user 0m13.005s
109sys 0m0.012s
110
111------------------------------------------------- C - tcc - printf
112#include <stdio.h>
113
114#define RUNS 10000000UL
115int main (void)
116{
117 unsigned long i;
118 for (i=0;i<RUNS;i++)
119 {
120 printf("%s %s\n","stuff2","stuff2");
121 }
122 return 0;
123}
124Compiling...
125real 0m0.012s
126user 0m0.008s
127sys 0m0.004s
128Running...
129real 0m4.987s
130user 0m4.856s
131sys 0m0.032s
132
133------------------------------------------------- C - tcc - fwrite
134#include <stdio.h>
135#include <string.h>
136
137#define RUNS 10000000UL
138int main (void)
139{
140 unsigned long i;
141 char *s1="stuff1";
142 char *s2="stuff2";
143 int l1=strlen(s1);
144 int l2=strlen(s2);
145
146 for (i=0;i<RUNS;i++)
147 {
148 fwrite(s1,l1,1,stdout);
149 fwrite(" ",1,1,stdout);
150 fwrite(s2,l2,1,stdout);
151 fwrite("\n",1,1,stdout);
152 }
153 return 0;
154}
155Compiling...
156real 0m0.017s
157user 0m0.012s
158sys 0m0.004s
159Running...
160real 0m3.678s
161user 0m3.672s
162sys 0m0.004s
163
164----------------------------------------------- C<<1 - tcc - print
165#include "cll1.h"
166
167program
168{
169 repeat(10000000)
170 print("stuff1","stuff2");
171}
172Compiling...
173real 0m0.022s
174user 0m0.016s
175sys 0m0.004s
176Running...
177real 0m4.853s
178user 0m4.836s
179sys 0m0.016s
180
181-------------------------------------------------- C - tcc - fputs
182#include <stdio.h>
183
184#define RUNS 10000000UL
185int main (void)
186{
187 unsigned long i;
188 for (i=0;i<RUNS;i++) {
189 fputs("stuff1",stdout);
190 fputs(" ",stdout);
191 fputs("stuff2",stdout);
192 fputs("\n",stdout);
193 }
194 return 0;
195}
196Compiling...
197real 0m0.012s
198user 0m0.008s
199sys 0m0.004s
200Running...
201real 0m4.065s
202user 0m4.040s
203sys 0m0.024s
204
205------------------------------------------------- C - gcc - printf
206#include <stdio.h>
207
208#define RUNS 10000000UL
209int main (void)
210{
211 unsigned long i;
212 for (i=0;i<RUNS;i++)
213 {
214 printf("%s %s\n","stuff2","stuff2");
215 }
216 return 0;
217}
218Compiling...
219real 0m0.180s
220user 0m0.152s
221sys 0m0.028s
222Running...
223real 0m4.877s
224user 0m4.860s
225sys 0m0.020s
226
227------------------------------------------------- C - gcc - fwrite
228#include <stdio.h>
229#include <string.h>
230
231#define RUNS 10000000UL
232int main (void)
233{
234 unsigned long i;
235 char *s1="stuff1";
236 char *s2="stuff2";
237 int l1=strlen(s1);
238 int l2=strlen(s2);
239
240 for (i=0;i<RUNS;i++)
241 {
242 fwrite(s1,l1,1,stdout);
243 fwrite(" ",1,1,stdout);
244 fwrite(s2,l2,1,stdout);
245 fwrite("\n",1,1,stdout);
246 }
247 return 0;
248}
249Compiling...
250real 0m0.205s
251user 0m0.156s
252sys 0m0.048s
253Running...
254real 0m3.640s
255user 0m3.620s
256sys 0m0.020s
257
258----------------------------------------------- C<<1 - gcc - print
259#include "cll1.h"
260
261program
262{
263 repeat(10000000)
264 print("stuff1","stuff2");
265}
266Compiling...
267real 0m0.378s
268user 0m0.336s
269sys 0m0.040s
270Running...
271real 0m4.457s
272user 0m4.448s
273sys 0m0.012s
274
275-------------------------------------------------- C - gcc - fputs
276#include <stdio.h>
277
278#define RUNS 10000000UL
279int main (void)
280{
281 unsigned long i;
282 for (i=0;i<RUNS;i++) {
283 fputs("stuff1",stdout);
284 fputs(" ",stdout);
285 fputs("stuff2",stdout);
286 fputs("\n",stdout);
287 }
288 return 0;
289}
290Compiling...
291real 0m0.190s
292user 0m0.172s
293sys 0m0.020s
294Running...
295real 0m2.556s
296user 0m2.544s
297sys 0m0.012s
This page took 0.106319 seconds and 4 git commands to generate.