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 10:19

time echo "for (0..100000000) { \$b = 3.14159265 / 1.161803399; }" | perl

real    0m6.201s
user    0m5.923s
sys    0m0.049s

Name: Anonymous 2012-01-08 10:25

>>38
UPDATE: I booted up Mac OS X and run the same executable with mono.

$ time mono benchmark.exe

real    0m0.204s
user    0m0.191s
sys    0m0.008s


Therefore we can conclude C# and CLR is superior to all your shitty languages.

Name: Anonymous 2012-01-08 10:26

>>42
It optimized it out. What you timed is the time it takes for the VM to load.

Name: Anonymous 2012-01-08 10:30

check 'em

Name: Anonymous 2012-01-08 10:46

>>38-40 ps > cmd

Name: Anonymous 2012-01-08 10:50

>>42
$ time echo 'main(){ double b; int i; for (i = 0; i < 100000000; ++i) b = 3.14159265 / 1.161803399; }'| gcc -xc -O1 - && time ./a.out

real    0m0.065s
user    0m0.043s
sys    0m0.017s

real    0m0.073s
user    0m0.067s
sys    0m0.003s

Name: Anonymous 2012-01-08 10:56

>>46
C is shit.

Name: Anonymous 2012-01-08 11:11

>>47 shit's fasta!

Name: Anonymous 2012-01-08 11:16

>>48
shit's shit.

Name: Anonymous 2012-01-08 12:25

>>47-49
shit's shit
shit's fasta!
C is shit.

Lisp is shit.
Lisp's fasta!
C is Lisp.

Name: Anonymous 2012-01-08 12:41

this thread is retarded

Name: Anonymous 2012-01-08 13:00


* (defun l100 () (dotimes (i 100000000) (/ 3.14159265 1.161803399)))

L100
* (time (l100))

Evaluation took:
  0.160 seconds of real time
  0.160010 seconds of total run time (0.144009 user, 0.016001 system)
  100.00% CPU
  426,443,480 processor cycles
  0 bytes consed 

NIL

Name: Anonymous 2012-01-08 13:04

>>52
>100% CPU
Lol lisp is shit.

Name: Anonymous 2012-01-08 13:15

>>53
That's like saying Linux is shit because it uses 100% RAM.

Name: Anonymous 2012-01-08 13:27

>>53
Clearly we should restrict all benchmarks to a maximum of 10% cpu usage, that will give us the results we want.

Name: Anonymous 2012-01-08 13:29

>>53,54
TROLLED HARD!

Name: Anonymous 2012-01-08 13:32

>>56
You meant >>54,55. Don't fuck up again.

Name: Anonymous 2012-01-08 13:34

>>57
Your trolling is horrible, please try better next time /g/

Name: Anonymous 2012-01-08 13:39

>>58
u mad
/polecat kebabs/

Name: Anonymous 2012-01-08 15:37

>>36
[quote]Real code does not do things like this at all[/quote]

Have you ever used OpenGL? It's all floating point arithmetic, and benchmarking that is a true show of the speed of a language. Maybe OpenGL doesn't divide Pi by Phi millions of times, but it uses trigonometry like a bitch

Name: Anonymous 2012-01-08 15:41

>>60
Benchmarking OpenGL is a true show of the speed of a language
Who am I quoting.

Name: Anonymous 2012-01-08 15:54

/lolcat shebab/

Name: Anonymous 2012-01-08 15:56

This is retarded in many ways. A moderate precompiler would already calculate 3.14159265 / 1.161803399 etc.

Name: Anonymous 2012-01-08 16:01

>>60
You're braindamaged if you think that OpenGL does floating point divisions of two constants in a loop and nothing else. You can benchmark an OpenGL program that you port to multiple languages and see if you run into any differences. There already are implementations of things like glxgears in most languages with OpenGL bindings, so it's not like you would have to write any real code.
But if you think timing a million divisions in a loop is the same thing as benchmarking a whole OpenGL program, as if the entire doing graphics thing is non-important to the sight of floating point divisions (of constants), that would explain everything.

>>61
You're paraphrasing >>60.

Name: Anonymous 2012-01-08 17:10

>>64 bindings
aren't ports

Name: DUBS LIBERATION FRONT 2012-03-24 18:31

NON-DUBS SHALL BE CLEANSED FROM THE EARTH!

Name: Anonymous 2012-03-25 21:42

>>1
Fucking nice post! Badabababa I'm lovin' it!

Name: Anonymous 2012-03-26 18:59

>>51
All post-2011 threads on /prog/ are.

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