osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python's carbon guilt


On 10/10/20 9:58 AM, Peter Pearson wrote:
> Python advocates might want to organize their thoughts on
> this subject before their bosses spring the suggestion:
> 
> From https://www.sciencemag.org/news/2020/10/we-re-part-problem-astronomers-confront-their-role-and-vulnerability-climate-change :
> 
>     . . . Astronomers should also abandon popular programming languages
>     such as Python in favor of efficient compiled languages. Languages
>     such as Fortran and C++, Zwart calculates, are more than 100 times
>     more carbon efficient than Python because they require fewer
>     operations.

Most of the math heavy lifting is done by compiled code that is merely
called from Python.  I seriously doubt there is anything to save by
abandoning Python for something that is harder to use, slower, and
probably burns way more electricity with all those compile cycles that
they'd be forced to do.