Showing posts from March, 2011

Python vs JS vs PHP for embedded systems

UPDATE (07/18/17): The original article was written in 2011 and pretty much outdated, I've updated the numbers and conclusions.

I've got a question about which programming language is preferable for the website development for embedded systems (with limited resources). Here is my small investigation in a table form. Please note that the question was about only these 3 programming languages - there are better candidates for the embedded systems now (for example, Rust).

The Memory and Performance overhead numbers are based on the n-body benchmark and calculated as relatives to "C gcc #4" measurements.

Python 3Node.jsPHPMemory
Overheadx7.62x29.04x8.53Type SystemStrong TypingWeak TypingWeak TypingVulnerabilities22014115626Performance
Overheadx78.31x2.82x30.12DocumentationExcellentExcellentAverageC BindingsExcellentAveragePoorCode
ReadabilityWith PEP8 it can be almost perfectESLint enforces very good stylePEAR Coding Standards isn't consistent and not used so muchDebug…