2814fb59 |
1 | AMD Athlon(tm) XP 1259.487 Mhz 2522.30 bogomips |
06ab91f0 |
2 | -------------------------------------------------- C - gcc - write |
67db9ef1 |
3 | #include <string.h> |
4 | |
5 | #define RUNS 10000000UL |
6 | int 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 |
18 | Compiling... |
2814fb59 |
19 | real 0m1.102s |
20 | user 0m0.212s |
21 | sys 0m0.044s |
06ab91f0 |
22 | Running... |
2814fb59 |
23 | real 0m7.171s |
24 | user 0m1.636s |
25 | sys 0m5.536s |
06ab91f0 |
26 | ------------------------------------------------------------- Perl |
ba41861f |
27 | #!/usr/bin/perl |
28 | |
29 | my $i=0; |
30 | for ($i=0;$i<10000000;$i++) |
31 | { |
32 | print ("stuff"); |
33 | } |
34 | |
06ab91f0 |
35 | Running... |
2814fb59 |
36 | real 0m5.808s |
37 | user 0m5.600s |
38 | sys 0m0.012s |
06ab91f0 |
39 | ----------------------------------------------- C<<1 - gcc - print |
40 | #include "cll1.h" |
283bc497 |
41 | |
06ab91f0 |
42 | program |
43 | { |
44 | repeat(10000000) |
45 | print("stuff"); |
46 | } |
47 | Compiling... |
2814fb59 |
48 | real 0m0.567s |
49 | user 0m0.352s |
50 | sys 0m0.028s |
06ab91f0 |
51 | Running... |
2814fb59 |
52 | real 0m2.122s |
53 | user 0m2.112s |
54 | sys 0m0.008s |
06ab91f0 |
55 | ---------------------------------------------- C - g++ - std::cout |
d8394559 |
56 | #include <iostream> |
57 | |
58 | #define RUNS 10000000UL |
59 | int 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 |
68 | Compiling... |
2814fb59 |
69 | real 0m1.973s |
70 | user 0m1.016s |
71 | sys 0m0.100s |
06ab91f0 |
72 | Running... |
2814fb59 |
73 | real 0m1.763s |
74 | user 0m1.752s |
75 | sys 0m0.012s |
76 | ----------------------------------------------- C<<1 - tcc - print |
77 | #include "cll1.h" |
78 | |
79 | program |
80 | { |
81 | repeat(10000000) |
82 | print("stuff"); |
83 | } |
84 | Compiling... |
85 | real 0m0.148s |
86 | user 0m0.020s |
87 | sys 0m0.008s |
88 | Running... |
89 | real 0m2.259s |
90 | user 0m2.252s |
91 | sys 0m0.008s |
92 | ------------------------------------------------- C - tcc - printf |
93 | #include <stdio.h> |
94 | |
95 | #define RUNS 10000000UL |
96 | int main (void) |
97 | { |
98 | unsigned long i; |
99 | for (i=0;i<RUNS;i++) |
100 | { |
101 | printf("stuff\n"); |
102 | } |
103 | return 0; |
104 | } |
105 | Compiling... |
106 | real 0m0.032s |
107 | user 0m0.004s |
108 | sys 0m0.008s |
109 | Running... |
110 | real 0m1.924s |
111 | user 0m1.924s |
112 | sys 0m0.000s |
113 | ------------------------------------------------ C<<1 - tcc - echo |
81088cec |
114 | #include "cll1.h" |
115 | |
116 | program |
117 | { |
06ab91f0 |
118 | unsigned long i; |
119 | for_range(i,1,10000000) |
120 | echo("stuff\n"); |
81088cec |
121 | } |
06ab91f0 |
122 | Compiling... |
2814fb59 |
123 | real 0m0.021s |
124 | user 0m0.016s |
125 | sys 0m0.004s |
126 | Running... |
127 | real 0m1.109s |
128 | user 0m1.104s |
129 | sys 0m0.008s |
130 | --------------------------------------------------- C - tcc - puts |
131 | #include <stdio.h> |
132 | |
133 | #define RUNS 10000000UL |
134 | int main (void) |
135 | { |
136 | unsigned long i; |
137 | for (i=0;i<RUNS;i++) |
138 | { |
139 | puts("stuff"); |
140 | } |
141 | return 0; |
142 | } |
143 | Compiling... |
144 | real 0m0.014s |
145 | user 0m0.008s |
06ab91f0 |
146 | sys 0m0.008s |
147 | Running... |
2814fb59 |
148 | real 0m1.152s |
149 | user 0m1.144s |
150 | sys 0m0.008s |
151 | ------------------------------------------------- C - tcc - fwrite |
152 | #include <stdio.h> |
153 | #include <string.h> |
154 | |
155 | #define RUNS 10000000UL |
156 | int 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 | } |
168 | Compiling... |
169 | real 0m0.013s |
170 | user 0m0.012s |
171 | sys 0m0.000s |
172 | Running... |
173 | real 0m1.048s |
174 | user 0m1.032s |
175 | sys 0m0.016s |
176 | -------------------------------------------------- C - tcc - fputs |
177 | #include <stdio.h> |
178 | |
179 | #define RUNS 10000000UL |
180 | int 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 | } |
189 | Compiling... |
190 | real 0m0.012s |
191 | user 0m0.012s |
06ab91f0 |
192 | sys 0m0.000s |
2814fb59 |
193 | Running... |
194 | real 0m1.152s |
195 | user 0m1.144s |
196 | sys 0m0.008s |
197 | ------------------------------------------------ C<<1 - gcc - echo |
198 | #include "cll1.h" |
199 | |
200 | program |
201 | { |
202 | unsigned long i; |
203 | for_range(i,1,10000000) |
204 | echo("stuff\n"); |
205 | } |
206 | Compiling... |
207 | real 0m0.351s |
208 | user 0m0.308s |
209 | sys 0m0.040s |
210 | Running... |
211 | real 0m1.243s |
212 | user 0m1.236s |
213 | sys 0m0.008s |
06ab91f0 |
214 | ------------------------------------------------- C - gcc - printf |
81088cec |
215 | #include <stdio.h> |
216 | |
217 | #define RUNS 10000000UL |
218 | int 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 |
227 | Compiling... |
2814fb59 |
228 | real 0m0.196s |
229 | user 0m0.164s |
230 | sys 0m0.032s |
06ab91f0 |
231 | Running... |
2814fb59 |
232 | real 0m1.106s |
233 | user 0m1.104s |
234 | sys 0m0.004s |
06ab91f0 |
235 | --------------------------------------------------- C - gcc - puts |
e1fbb836 |
236 | #include <stdio.h> |
237 | |
238 | #define RUNS 10000000UL |
239 | int 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 |
248 | Compiling... |
2814fb59 |
249 | real 0m0.197s |
250 | user 0m0.172s |
251 | sys 0m0.028s |
06ab91f0 |
252 | Running... |
2814fb59 |
253 | real 0m1.105s |
254 | user 0m1.084s |
255 | sys 0m0.020s |
06ab91f0 |
256 | ------------------------------------------------- C - gcc - fwrite |
e1fbb836 |
257 | #include <stdio.h> |
258 | #include <string.h> |
259 | |
260 | #define RUNS 10000000UL |
261 | int 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 |
273 | Compiling... |
2814fb59 |
274 | real 0m0.216s |
275 | user 0m0.188s |
276 | sys 0m0.028s |
06ab91f0 |
277 | Running... |
2814fb59 |
278 | real 0m1.027s |
279 | user 0m1.012s |
280 | sys 0m0.012s |
06ab91f0 |
281 | -------------------------------------------------- C - gcc - fputs |
282 | #include <stdio.h> |
283 | |
284 | #define RUNS 10000000UL |
285 | int 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 | } |
294 | Compiling... |
2814fb59 |
295 | real 0m0.199s |
296 | user 0m0.152s |
297 | sys 0m0.048s |
06ab91f0 |
298 | Running... |
2814fb59 |
299 | real 0m1.023s |
300 | user 0m1.008s |
301 | sys 0m0.016s |