| 1 | #!/usr/bin/ruby |
| 2 | |
| 3 | 10000000.times { print "stuff1"," ","stuff2","\n" } |
| 4 | Running...0:24.57 total, 23.03 user, 1.51 sys, 0 outputs |
| 5 | |
| 6 | #!/usr/bin/python |
| 7 | |
| 8 | for i in range(1,10000000): |
| 9 | print "stuff1","stuff2" |
| 10 | |
| 11 | Running...0:13.80 total, 13.53 user, 0.17 sys, 0 outputs |
| 12 | |
| 13 | #!/usr/bin/python |
| 14 | |
| 15 | for i in xrange(1,10000000): |
| 16 | print "stuff1","stuff2" |
| 17 | |
| 18 | Running...0:13.43 total, 13.20 user, 0.02 sys, 0 outputs |
| 19 | |
| 20 | #!/usr/bin/php5 -q |
| 21 | <?php |
| 22 | for ( $i=0; $i<10000000; $i++ ) |
| 23 | { |
| 24 | echo "stuff1"." "."stuff2"."\n"; |
| 25 | } |
| 26 | ?> |
| 27 | Running...0:11.93 total, 9.84 user, 2.08 sys, 0 outputs |
| 28 | |
| 29 | #include <stdio.h> |
| 30 | #include <string.h> |
| 31 | |
| 32 | #define RUNS 10000000UL |
| 33 | int main (void) |
| 34 | { |
| 35 | unsigned long i; |
| 36 | char *s1="stuff1"; |
| 37 | char *s2="stuff2"; |
| 38 | int l1=strlen(s1); |
| 39 | int l2=strlen(s2); |
| 40 | |
| 41 | for (i=0;i<RUNS;i++) |
| 42 | { |
| 43 | write(1,s1,l1); |
| 44 | write(1," ",1); |
| 45 | write(1,s2,l2); |
| 46 | write(1,"\n",1); |
| 47 | } |
| 48 | return 0; |
| 49 | } |
| 50 | Compiling...0:00.07 total, 0.06 user, 0.00 sys, 0 outputs |
| 51 | Running...0:11.92 total, 3.78 user, 7.86 sys, 0 outputs |
| 52 | |
| 53 | #include <iostream> |
| 54 | |
| 55 | #define RUNS 10000000UL |
| 56 | int main() |
| 57 | { |
| 58 | unsigned long i; |
| 59 | for (i=0;i<RUNS;i++) { |
| 60 | std::cout << "stuff1" << " " << "stuff2" << std::endl; |
| 61 | } |
| 62 | return 0; |
| 63 | } |
| 64 | Compiling...0:00.38 total, 0.33 user, 0.05 sys, 0 outputs |
| 65 | Running...0:08.22 total, 6.18 user, 2.01 sys, 0 outputs |
| 66 | |
| 67 | #!/usr/bin/perl |
| 68 | |
| 69 | my $i=0; |
| 70 | for ($i=0;$i<10000000;$i++) |
| 71 | { |
| 72 | print ("stuff1"," ","stuff2","\n"); |
| 73 | } |
| 74 | Running...0:05.97 total, 5.96 user, 0.00 sys, 0 outputs |
| 75 | |
| 76 | #include <stdio.h> |
| 77 | |
| 78 | #define RUNS 10000000UL |
| 79 | int main (void) |
| 80 | { |
| 81 | unsigned long i; |
| 82 | for (i=0;i<RUNS;i++) { |
| 83 | printf("%s %s\n","stuff2","stuff2"); |
| 84 | } |
| 85 | return 0; |
| 86 | } |
| 87 | Compiling...0:00.06 total, 0.05 user, 0.00 sys, 0 outputs |
| 88 | Running...0:02.87 total, 2.84 user, 0.01 sys, 0 outputs |
| 89 | |
| 90 | #include "cll1.h" |
| 91 | |
| 92 | program |
| 93 | { |
| 94 | repeat(10000000) |
| 95 | print("stuff1","stuff2"); |
| 96 | } |
| 97 | Compiling...0:00.14 total, 0.12 user, 0.00 sys, 0 outputs |
| 98 | Running...0:02.77 total, 2.76 user, 0.00 sys, 0 outputs |
| 99 | |
| 100 | #include <stdio.h> |
| 101 | |
| 102 | #define RUNS 10000000UL |
| 103 | int main (void) |
| 104 | { |
| 105 | unsigned long i; |
| 106 | for (i=0;i<RUNS;i++) { |
| 107 | fputs("stuff1",stdout); |
| 108 | fputs(" ",stdout); |
| 109 | fputs("stuff2",stdout); |
| 110 | fputs("\n",stdout); |
| 111 | } |
| 112 | return 0; |
| 113 | } |
| 114 | Compiling...0:00.07 total, 0.04 user, 0.02 sys, 0 outputs |
| 115 | Running...0:01.52 total, 1.52 user, 0.00 sys, 0 outputs |
| 116 | |