I have a Raspberry Pi that runs under a power bank (battery) of 10.000 mAh.

I want to develop and application which does non-blocking IO from the USB port and sends data over network to accumulation server.

The first choice was to develop this app in Python which would be easy and fast. Then, after searching, I realized that Python seems to be one of the most costly languages ,when it has to do with energy consumption.

Currently, I am searching which could be the most suitable language in order the battery to last longer?

And to be more specific,

Is difference in energy consumption so important in this kind of setup? I mean is the code running consumes so much energy that can create a significant difference in battery life?

And secondly, do anyone know a way actually run a program and measure its consumption?

thanks a lot ~yiorgos

2 Answers 2


I doubt the programming language would make any measurable difference to power consumption. I have not heard of programming language as a factor in running costs.


There are all over the internet comparisons of the energy efficiency of various languages. What you have to be aware of is wether you want to implement X or Y technology just to have a 5% improvement on that front, giving you just/barely minutes of extra up time per charge.

If you have say a farm of Pi's then 5% in energy costs would be a-OK to pursue, but otherwise just solve your problem (in this case go with Python) that you are ok.

Note: There are things (mainly peripherals) you can disable on the Pi via software that will save you extra miliwatts at the end of the day (don't quote me on that): RPi 3 - Reduce power consumption

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.