version 0.6 moved to branches/ directory
[svn/Cll1h/.git] / demos / performance / test-results
CommitLineData
2814fb59 1AMD Athlon(tm) XP 1259.487 Mhz 2522.30 bogomips
06ab91f0 2-------------------------------------------------- C - gcc - write
67db9ef1 3#include <string.h>
4
5#define RUNS 10000000UL
6int main (void)
7{
8 unsigned long i;
9 char *s1="stuff\n";
10 int l1=strlen(s1);
11
06ab91f0 12 for (i=0;i<RUNS;i++)
13 {
14 write(1,s1,l1);
15 }
16 return 0;
67db9ef1 17}
06ab91f0 18Compiling...
2814fb59 19real 0m1.102s
20user 0m0.212s
21sys 0m0.044s
06ab91f0 22Running...
2814fb59 23real 0m7.171s
24user 0m1.636s
25sys 0m5.536s
06ab91f0 26------------------------------------------------------------- Perl
ba41861f 27#!/usr/bin/perl
28
29my $i=0;
30for ($i=0;$i<10000000;$i++)
31{
32 print ("stuff");
33}
34
06ab91f0 35Running...
2814fb59 36real 0m5.808s
37user 0m5.600s
38sys 0m0.012s
06ab91f0 39----------------------------------------------- C<<1 - gcc - print
40#include "cll1.h"
283bc497 41
06ab91f0 42program
43{
44 repeat(10000000)
45 print("stuff");
46}
47Compiling...
2814fb59 48real 0m0.567s
49user 0m0.352s
50sys 0m0.028s
06ab91f0 51Running...
2814fb59 52real 0m2.122s
53user 0m2.112s
54sys 0m0.008s
06ab91f0 55---------------------------------------------- C - g++ - std::cout
d8394559 56#include <iostream>
57
58#define RUNS 10000000UL
59int main()
60{
61 unsigned long i;
06ab91f0 62 for (i=0;i<RUNS;i++)
63 {
64 std::cout << "stuff\n";
d8394559 65 }
66 return 0;
67}
06ab91f0 68Compiling...
2814fb59 69real 0m1.973s
70user 0m1.016s
71sys 0m0.100s
06ab91f0 72Running...
2814fb59 73real 0m1.763s
74user 0m1.752s
75sys 0m0.012s
76----------------------------------------------- C<<1 - tcc - print
77#include "cll1.h"
78
79program
80{
81 repeat(10000000)
82 print("stuff");
83}
84Compiling...
85real 0m0.148s
86user 0m0.020s
87sys 0m0.008s
88Running...
89real 0m2.259s
90user 0m2.252s
91sys 0m0.008s
92------------------------------------------------- C - tcc - printf
93#include <stdio.h>
94
95#define RUNS 10000000UL
96int main (void)
97{
98 unsigned long i;
99 for (i=0;i<RUNS;i++)
100 {
101 printf("stuff\n");
102 }
103 return 0;
104}
105Compiling...
106real 0m0.032s
107user 0m0.004s
108sys 0m0.008s
109Running...
110real 0m1.924s
111user 0m1.924s
112sys 0m0.000s
113------------------------------------------------ C<<1 - tcc - echo
81088cec 114#include "cll1.h"
115
116program
117{
06ab91f0 118 unsigned long i;
119 for_range(i,1,10000000)
120 echo("stuff\n");
81088cec 121}
06ab91f0 122Compiling...
2814fb59 123real 0m0.021s
124user 0m0.016s
125sys 0m0.004s
126Running...
127real 0m1.109s
128user 0m1.104s
129sys 0m0.008s
130--------------------------------------------------- C - tcc - puts
131#include <stdio.h>
132
133#define RUNS 10000000UL
134int main (void)
135{
136 unsigned long i;
137 for (i=0;i<RUNS;i++)
138 {
139 puts("stuff");
140 }
141 return 0;
142}
143Compiling...
144real 0m0.014s
145user 0m0.008s
06ab91f0 146sys 0m0.008s
147Running...
2814fb59 148real 0m1.152s
149user 0m1.144s
150sys 0m0.008s
151------------------------------------------------- C - tcc - fwrite
152#include <stdio.h>
153#include <string.h>
154
155#define RUNS 10000000UL
156int main (void)
157{
158 unsigned long i;
159 char *s1="stuff\n";
160 int l1=strlen(s1);
161
162 for (i=0;i<RUNS;i++)
163 {
164 fwrite(s1,l1,1,stdout);
165 }
166 return 0;
167}
168Compiling...
169real 0m0.013s
170user 0m0.012s
171sys 0m0.000s
172Running...
173real 0m1.048s
174user 0m1.032s
175sys 0m0.016s
176-------------------------------------------------- C - tcc - fputs
177#include <stdio.h>
178
179#define RUNS 10000000UL
180int main (void)
181{
182 unsigned long i;
183 for (i=0;i<RUNS;i++)
184 {
185 fputs("stuff\n",stdout);
186 }
187 return 0;
188}
189Compiling...
190real 0m0.012s
191user 0m0.012s
06ab91f0 192sys 0m0.000s
2814fb59 193Running...
194real 0m1.152s
195user 0m1.144s
196sys 0m0.008s
197------------------------------------------------ C<<1 - gcc - echo
198#include "cll1.h"
199
200program
201{
202 unsigned long i;
203 for_range(i,1,10000000)
204 echo("stuff\n");
205}
206Compiling...
207real 0m0.351s
208user 0m0.308s
209sys 0m0.040s
210Running...
211real 0m1.243s
212user 0m1.236s
213sys 0m0.008s
06ab91f0 214------------------------------------------------- C - gcc - printf
81088cec 215#include <stdio.h>
216
217#define RUNS 10000000UL
218int main (void)
219{
06ab91f0 220 unsigned long i;
221 for (i=0;i<RUNS;i++)
222 {
223 printf("stuff\n");
224 }
225 return 0;
81088cec 226}
06ab91f0 227Compiling...
2814fb59 228real 0m0.196s
229user 0m0.164s
230sys 0m0.032s
06ab91f0 231Running...
2814fb59 232real 0m1.106s
233user 0m1.104s
234sys 0m0.004s
06ab91f0 235--------------------------------------------------- C - gcc - puts
e1fbb836 236#include <stdio.h>
237
238#define RUNS 10000000UL
239int main (void)
240{
06ab91f0 241 unsigned long i;
242 for (i=0;i<RUNS;i++)
243 {
244 puts("stuff");
245 }
246 return 0;
e1fbb836 247}
06ab91f0 248Compiling...
2814fb59 249real 0m0.197s
250user 0m0.172s
251sys 0m0.028s
06ab91f0 252Running...
2814fb59 253real 0m1.105s
254user 0m1.084s
255sys 0m0.020s
06ab91f0 256------------------------------------------------- C - gcc - fwrite
e1fbb836 257#include <stdio.h>
258#include <string.h>
259
260#define RUNS 10000000UL
261int main (void)
262{
263 unsigned long i;
264 char *s1="stuff\n";
265 int l1=strlen(s1);
266
267 for (i=0;i<RUNS;i++)
268 {
269 fwrite(s1,l1,1,stdout);
270 }
271 return 0;
272}
06ab91f0 273Compiling...
2814fb59 274real 0m0.216s
275user 0m0.188s
276sys 0m0.028s
06ab91f0 277Running...
2814fb59 278real 0m1.027s
279user 0m1.012s
280sys 0m0.012s
06ab91f0 281-------------------------------------------------- C - gcc - fputs
282#include <stdio.h>
283
284#define RUNS 10000000UL
285int main (void)
286{
287 unsigned long i;
288 for (i=0;i<RUNS;i++)
289 {
290 fputs("stuff\n",stdout);
291 }
292 return 0;
293}
294Compiling...
2814fb59 295real 0m0.199s
296user 0m0.152s
297sys 0m0.048s
06ab91f0 298Running...
2814fb59 299real 0m1.023s
300user 0m1.008s
301sys 0m0.016s
This page took 0.32049 seconds and 4 git commands to generate.