how to have fun with your computer?
make it print "Hello world" 1000 times.
http://www.phpprogrammer.co.nz/speed-test-php-vs-perl-vs-python-vs-go-vs-c/comment-page-1#comment-56336
Lets do science. I will start. Here are my tests and my results. Please try and share.
josh i7 = MBP early 2011 2.3ghz i7, 16gb ram, 256gb Crucial m4 ssd, osx 10.8.4
I had wanted to start using node for devops but it poor showing printing 1000 hello worlds is making me think twice. NOT! :D
time for i in {1..1000}; do php -r 'print ("hello world ");'; done;
42 seconds josh i7
17 seconds koding
time for i in {1..1000}; do perl -e 'print "hello world ";'; done;
6 seconds josh i7
5 seconds koding
time for i in {1..1000}; do python -c 'print("Hello world ")'; done;
27 seconds josh i7
20 seconds koding
96 seconds python anywhere free
time for i in {1..1000}; do echo "Hello World "; done;
0.012 seconds josh i7
0.025 seconds koding
time for i in {1..1000}; do node -e "console.log('Hello, world');"; done;
52 seconds josh i7
58 seconds koding
time for i in {1..1000}; do ruby -e 'puts "Hello world "'; done;
4.5 seconds josh i7
22 seconds koding
make it print "Hello world" 1000 times.
http://www.phpprogrammer.co.nz/speed-test-php-vs-perl-vs-python-vs-go-vs-c/comment-page-1#comment-56336
Lets do science. I will start. Here are my tests and my results. Please try and share.
josh i7 = MBP early 2011 2.3ghz i7, 16gb ram, 256gb Crucial m4 ssd, osx 10.8.4
I had wanted to start using node for devops but it poor showing printing 1000 hello worlds is making me think twice. NOT! :D
time for i in {1..1000}; do php -r 'print ("hello world ");'; done;
42 seconds josh i7
17 seconds koding
time for i in {1..1000}; do perl -e 'print "hello world ";'; done;
6 seconds josh i7
5 seconds koding
time for i in {1..1000}; do python -c 'print("Hello world ")'; done;
27 seconds josh i7
20 seconds koding
96 seconds python anywhere free
time for i in {1..1000}; do echo "Hello World "; done;
0.012 seconds josh i7
0.025 seconds koding
time for i in {1..1000}; do node -e "console.log('Hello, world');"; done;
52 seconds josh i7
58 seconds koding
time for i in {1..1000}; do ruby -e 'puts "Hello world "'; done;
4.5 seconds josh i7
22 seconds koding
time for i in {1..1000}; do lua -e ' print("Hello World")'; done;
3 seconds josh i7
4 seconds koding
don't care
time for i in {1..1000}; do echo 'puts "Hello World "' | tclsh; done;16 seconds
time for i in {1..10}; do groovy -e “println ‘Hello world’”; done;
31m26s
how about on koding.com?
time for i in {1..1000}; do go run hello.go; done;
4m 22 seconds
time for i in {1..1000}; do .\hello; done;
8 seconds
Comments