Python's carbon guilt

Peter J. Holzer hjp-python at hjp.at
Sat Oct 10 12:31:43 EDT 2020


On 2020-10-10 15:58:18 +0000, 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.
> 

It would be interesting on which data he based these calculations. For
simple benchmarks of numerical code that's almost certainly true, but I
doubt anyone writes code intended to run on a supercomputer in plain
Python. Surely such programs would use numpy or other specialized
libraries which are already written in C or Fortran and may even use a
GPU if present? There is of course still some overhead, but it's much
smaller.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp at hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20201010/f34ddfc6/attachment.sig>


More information about the Python-list mailing list