PHP vs. Java are there energy consumption differences?

Computers don’t particularly care if they’re executing Java or PHP. Power consumption is pretty much the same. The question then becomes a question of performance – if you can serve more requests with one server you’ll need less servers and consume less power. Or alternatively, if you’re not doing web scale applications, serve your requests quicker and spend more time idling, which consumes less power.

Given pure Java and pure PHP, Java as a statically typed JIT’ed language is of course faster. The question is rather which one can you make faster given the team members and development effort available to you.

My take is that the best way is to mix languages, use existing Java based infrastructural tools, such as Terracotta to build the performance critical parts and something more nimble to build complex but not that heavy business and presentation logic.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)