0

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

yiorgos
  • 9
  • 2

2 Answers2

1

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.

joan
  • 71,024
  • 5
  • 73
  • 106
0

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

Clóvis Fritzen
  • 373
  • 1
  • 11