email:
password:

Register for Free! RSS Feed
Random Faqqing
What does Beta mean and how long will idiotechnica.com be in it?
Beta is a fancy schmancy technical term that means: We do not want to take any responsibility for the quality of our software at this time. Idiotechnica will always be in beta.
firefox_logo
idiotechnica.com uses CSS3 and is optimized for viewing in Firefox versions 3+
Environmental impact of a programming language?

http://www.newirelandinfo.net/news/Internetnews/images/SlashdotLogo.gif Neat little article taken from Slashdot on the environmental impact of facebook's servers. According to the author (a blogger named koen) approximately 22,500 out of 30,000 servers could be shut down if facebook had used C++ instead of PHP as a programming language.

Reading through the comments, it seems most people in the know are scoffing at the idea, suggesting that it's impossible to compare the efficiency of each language without knowing how facebook has implemented it, as well as some fundamental reasons why a compiler language shouldn't be used for a site like facebook in the first place.

Is there any validity at all to the idea of certain programming languages being more environmentally friendly than others? And will this be cause for concern in the future when everything becomes web based?
Leave Comment:
Comment
Submit Post

Posts: Links / Environmental impact of a programming language?

share this thread on facebook

Posted By: Michael
12/20/09 02:48 PM

php is a high level language designed to do what the web does. id say its impractical to use c for a web application but the fact is, facebook probably has the money and resources to make it happen. from an idiotechnica standpoint, it would be unthinkable. i can make a php code change, evaluate the results and revert if necessary in a matter of seconds. with c not so much. so facebook would have to determine what the cost of time and manpower is compared to the cost of electricity with some publicity factored in for good measure. another possibility is hybrid technology. a prime candidate would be some chunk of code that would be significantly more efficient if done in c . say searching users takes up 30% more processing power in php. if you are confident that you will not be making constant major changes to this feature, you could build a c module that php could defer to for that functionality. i have a current issue at work where i need to do a lot of string search and replaces. php takes forever to do this and c could probably do it better. when i have the exact algorithm down, i will look into converting this functionality to c . granted im not trying to save the earth, im just looking for performance where i currently have a bottleneck. id be surprised if facebook isnt using this type of hybrid design already.
Posted By: glasshouse
12/20/09 06:44 PM

the problem with c++ is the only people who know it are the guys whose image leaps into your brain when you read "34 year old anime fan and gun owner seeking same-minded asian"
Posted By: Michael
12/22/09 11:22 AM

thats just silly. i know c++ and while some of that is accurate, ive never been attracted to asians.
Posted By: johnpg82
04/13/10 12:44 PM

Maybe you should check out Facebook's opensource project "Hip Hop".

It basically converts your PHP into C for you.

http://developers.faceboo...news.php?story=358&blog=1