Skip to main content

how to have fun with your computer

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



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

Popular posts from this blog

clipy mac clipboard crash - troubleshoot and fix

 clipy for mac wouldn't load solution - timemachine restore of /Users/jpaul/Library/Application Support/com.clipy-app.Clipy/default.realm troubleshoot key command didn't work app not loaded console.app showed app crashing tried older newer versions of app tried older version of os tried to find data location no documentation on github /Users/ME/Library/Application Support/com.clipy-app.Clipy/ - didn't see any data /Users/ME/Library/Application Support/Clipy - found data in binary format tried silver searcher for the only keyword i could remember: ag keyword ~/ -  no results added binary ag --search-binary keyword ~/ Binary file /Users/ME/Dropbox/Backups/com.clipy-app.Clipy/default.realm matches. it is in default.realm downloaded realm studio - but i was getting an error Unable to open a realm at path '/Users/ME/Desktop/default.realm': Invalid top array size  googling that - it's a corrupt database restored default.realm from timemachine  and database opened and ...

How to change default calendar for new events in Lightning

https://getsatisfaction.com/mozilla_messaging/topics/how_set_default_calendar_for_new_events_in_lightning Edited version Open Tools > Options > Advanced tab, and click Config Editor button. In the "Filter:" box enter "calendar.registry"  Find a .calendar-main-default key - it will be set to true Other calendars either won't have a .calendar-main-default key (or it will be set to false) Right click on the value of the .calendar-main-default key that goes with the calendar that currently shows up by default in new events to toggle the value to false Click on the .calendar-main-in-composite key that goes with the calendar you want as default Right click on the same key and choose Copy Name from the menu that appears. Now right click on the key again and select New > Boolean Paste the name of the key and Use the backspace key to erase "in-composite" and type "default" Click OK and Choose true and click OK Now exit out of ...