Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

hrtuhturht

Name: Anonymous 2012-01-07 19:05

Python:

time echo "for i in range(100000000): b = 3.14159265 / 1.161803399" | python

real    1m12.866s
user    1m11.549s
sys    0m0.160s


Ruby:

time echo "100000000.times do b = 3.14159265 / 1.161803399 end" | ruby

real    1m6.056s
user    1m5.952s
sys    0m0.047s


C:

benchmark.c:

int main(){
    double a;
    int x;
   
    for (x = 0; x < 100000000; x++)
    a  = 3.14159265 / 1.161803399;
}


Compilation:


time make benchmark
cc -ansi -pedantic -std=c1x  -lglut -lGLU -lrt  benchmark.c   -o benchmark

real    0m1.865s
user    0m0.240s
sys    0m0.073s


Run:

time ./benchmark

real    0m0.727s
user    0m0.630s
sys    0m0.007s


lol!

Name: Anonymous 2012-01-08 9:34


using System;

public class Benchmark
{
  public static void Main(string[] Args)
  {
    double a;
   
    for (int x = 0; x < 100000000; x++)
      a = 3.14159265 / 1.161803399;
  }
}

Results: (compiling just with a plain "csc benchmark.cs". And Windows has no "time" command, so I had to use Powershell)

PS C:\Users\me> Measure-Command {start-process benchmark.exe -Wait}


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 0
Milliseconds      : 351
Ticks             : 3511530
TotalDays         : 4,06427083333333E-06
TotalHours        : 9,75425E-05
TotalMinutes      : 0,00585255
TotalSeconds      : 0,351153
TotalMilliseconds : 351,153


WHAT NOW, BITCHES?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List