updated benchmark results for all tested platforms
[svn/Cll1h/.git] / demos / performance / test-results
CommitLineData
45cf8709 1AMD Athlon(tm) XP 1259.392 Mhz 2520.58 bogomips
2------------------------------------------------------------- Ruby
3#!/usr/bin/ruby
4
510000000.times { print "stuff","\n" }
6
7Running...
8real 0m55.542s
9user 0m35.498s
10sys 0m2.264s
11--------------------------------------------------- Python - range
12#!/usr/bin/python
13
14for i in range(1,10000000):
15 print "stuff"
16
17Running...
18real 0m30.673s
19user 0m19.113s
20sys 0m0.608s
21-------------------------------------------------- Python - xrange
22#!/usr/bin/python
23
24for i in xrange(1,10000000):
25 print "stuff"
26
27Running...
28real 0m31.379s
29user 0m19.581s
30sys 0m0.140s
31------------------------------------------------------------ PHP 5
32#!/usr/bin/php5 -q
33<?php
34for ( $i=0; $i<10000000; $i++ )
35{
36 echo "stuff1\n";
37}
38?>
39Running...
40real 0m36.652s
41user 0m9.573s
42sys 0m5.000s
06ab91f0 43-------------------------------------------------- C - gcc - write
67db9ef1 44#include <string.h>
45
46#define RUNS 10000000UL
47int main (void)
48{
49 unsigned long i;
50 char *s1="stuff\n";
51 int l1=strlen(s1);
52
06ab91f0 53 for (i=0;i<RUNS;i++)
54 {
55 write(1,s1,l1);
56 }
57 return 0;
67db9ef1 58}
06ab91f0 59Compiling...
45cf8709 60real 0m2.029s
61user 0m0.188s
62sys 0m0.080s
06ab91f0 63Running...
45cf8709 64real 0m5.983s
65user 0m1.524s
66sys 0m2.592s
06ab91f0 67------------------------------------------------------------- Perl
ba41861f 68#!/usr/bin/perl
69
70my $i=0;
71for ($i=0;$i<10000000;$i++)
72{
45cf8709 73 print ("stuff\n");
ba41861f 74}
75
06ab91f0 76Running...
45cf8709 77real 0m11.401s
78user 0m7.472s
79sys 0m0.032s
06ab91f0 80----------------------------------------------- C<<1 - gcc - print
81#include "cll1.h"
283bc497 82
06ab91f0 83program
84{
85 repeat(10000000)
86 print("stuff");
87}
88Compiling...
45cf8709 89real 0m2.385s
90user 0m0.436s
91sys 0m0.056s
06ab91f0 92Running...
45cf8709 93real 0m6.315s
94user 0m2.404s
95sys 0m0.024s
06ab91f0 96---------------------------------------------- C - g++ - std::cout
d8394559 97#include <iostream>
98
99#define RUNS 10000000UL
100int main()
101{
102 unsigned long i;
06ab91f0 103 for (i=0;i<RUNS;i++)
104 {
105 std::cout << "stuff\n";
d8394559 106 }
107 return 0;
108}
06ab91f0 109Compiling...
45cf8709 110real 0m6.245s
111user 0m1.128s
112sys 0m0.152s
06ab91f0 113Running...
45cf8709 114real 0m3.563s
115user 0m1.876s
a30ccb5a 116sys 0m0.016s
2814fb59 117----------------------------------------------- C<<1 - tcc - print
118#include "cll1.h"
119
120program
121{
122 repeat(10000000)
123 print("stuff");
124}
45cf8709 125Compiling...
126real 0m0.162s
127user 0m0.024s
128sys 0m0.008s
2814fb59 129Running...
45cf8709 130real 0m4.658s
131user 0m2.496s
132sys 0m0.008s
2814fb59 133------------------------------------------------- C - tcc - printf
134#include <stdio.h>
135
136#define RUNS 10000000UL
137int main (void)
138{
139 unsigned long i;
140 for (i=0;i<RUNS;i++)
141 {
142 printf("stuff\n");
143 }
144 return 0;
145}
45cf8709 146Compiling...
147real 0m0.014s
148user 0m0.012s
149sys 0m0.000s
2814fb59 150Running...
45cf8709 151real 0m3.011s
152user 0m1.916s
153sys 0m0.004s
2814fb59 154------------------------------------------------ C<<1 - tcc - echo
81088cec 155#include "cll1.h"
156
157program
158{
06ab91f0 159 unsigned long i;
160 for_range(i,1,10000000)
161 echo("stuff\n");
81088cec 162}
45cf8709 163Compiling...
164real 0m0.025s
165user 0m0.020s
166sys 0m0.004s
2814fb59 167Running...
45cf8709 168real 0m2.341s
169user 0m1.440s
170sys 0m0.020s
2814fb59 171--------------------------------------------------- C - tcc - puts
172#include <stdio.h>
173
174#define RUNS 10000000UL
175int main (void)
176{
177 unsigned long i;
178 for (i=0;i<RUNS;i++)
179 {
180 puts("stuff");
181 }
182 return 0;
183}
45cf8709 184Compiling...
185real 0m0.054s
2814fb59 186user 0m0.008s
a30ccb5a 187sys 0m0.004s
45cf8709 188Running...
189real 0m1.956s
190user 0m1.216s
191sys 0m0.012s
2814fb59 192------------------------------------------------- C - tcc - fwrite
193#include <stdio.h>
194#include <string.h>
195
196#define RUNS 10000000UL
197int main (void)
198{
199 unsigned long i;
200 char *s1="stuff\n";
201 int l1=strlen(s1);
202
203 for (i=0;i<RUNS;i++)
204 {
205 fwrite(s1,l1,1,stdout);
206 }
207 return 0;
208}
45cf8709 209Compiling...
210real 0m0.048s
211user 0m0.008s
a30ccb5a 212sys 0m0.004s
45cf8709 213Running...
214real 0m2.003s
215user 0m1.132s
216sys 0m0.012s
2814fb59 217-------------------------------------------------- C - tcc - fputs
218#include <stdio.h>
219
220#define RUNS 10000000UL
221int main (void)
222{
223 unsigned long i;
224 for (i=0;i<RUNS;i++)
225 {
226 fputs("stuff\n",stdout);
227 }
228 return 0;
229}
45cf8709 230Compiling...
231real 0m0.027s
232user 0m0.012s
a30ccb5a 233sys 0m0.004s
2814fb59 234Running...
45cf8709 235real 0m2.016s
236user 0m1.212s
237sys 0m0.020s
2814fb59 238------------------------------------------------ C<<1 - gcc - echo
239#include "cll1.h"
240
241program
242{
243 unsigned long i;
244 for_range(i,1,10000000)
245 echo("stuff\n");
246}
247Compiling...
45cf8709 248real 0m0.891s
249user 0m0.424s
250sys 0m0.040s
2814fb59 251Running...
45cf8709 252real 0m2.317s
253user 0m1.340s
254sys 0m0.020s
06ab91f0 255------------------------------------------------- C - gcc - printf
81088cec 256#include <stdio.h>
257
258#define RUNS 10000000UL
259int main (void)
260{
06ab91f0 261 unsigned long i;
262 for (i=0;i<RUNS;i++)
263 {
264 printf("stuff\n");
265 }
266 return 0;
81088cec 267}
06ab91f0 268Compiling...
45cf8709 269real 0m0.651s
270user 0m0.188s
271sys 0m0.040s
06ab91f0 272Running...
45cf8709 273real 0m2.099s
274user 0m1.176s
275sys 0m0.020s
06ab91f0 276--------------------------------------------------- C - gcc - puts
e1fbb836 277#include <stdio.h>
278
279#define RUNS 10000000UL
280int main (void)
281{
06ab91f0 282 unsigned long i;
283 for (i=0;i<RUNS;i++)
284 {
285 puts("stuff");
286 }
287 return 0;
e1fbb836 288}
06ab91f0 289Compiling...
45cf8709 290real 0m0.574s
291user 0m0.176s
292sys 0m0.040s
a30ccb5a 293Running...
45cf8709 294real 0m1.640s
295user 0m1.196s
296sys 0m0.008s
06ab91f0 297------------------------------------------------- C - gcc - fwrite
e1fbb836 298#include <stdio.h>
299#include <string.h>
300
301#define RUNS 10000000UL
302int main (void)
303{
304 unsigned long i;
305 char *s1="stuff\n";
306 int l1=strlen(s1);
307
308 for (i=0;i<RUNS;i++)
309 {
310 fwrite(s1,l1,1,stdout);
311 }
312 return 0;
313}
06ab91f0 314Compiling...
45cf8709 315real 0m0.547s
316user 0m0.220s
317sys 0m0.020s
06ab91f0 318Running...
45cf8709 319real 0m2.138s
320user 0m1.072s
321sys 0m0.008s
06ab91f0 322-------------------------------------------------- C - gcc - fputs
323#include <stdio.h>
324
325#define RUNS 10000000UL
326int main (void)
327{
328 unsigned long i;
329 for (i=0;i<RUNS;i++)
330 {
331 fputs("stuff\n",stdout);
332 }
333 return 0;
334}
335Compiling...
45cf8709 336real 0m0.319s
337user 0m0.184s
338sys 0m0.048s
06ab91f0 339Running...
45cf8709 340real 0m2.010s
341user 0m1.092s
342sys 0m0.020s
This page took 0.373626 seconds and 4 git commands to generate.