Just write in Rust, it's easier to build good software than either of these languages (yea, yea, do you data analyst stuff in python until you start using POLARS). At this point it's a far superior ecosystem from a developer experience point of view and the fact it's going to get you as close to efficient as possible without you thinking too far into it is a welcome side effect. Using VScode with the Sqlx package I g…
Do you use an extension other than just `rust-analyzer` in order to get compile-time errors for SQL with sqlx?
Python consumes 38x more energy than Java
71–80 of 142 posts
Re: Python consumes 38x more energy than Java
#72Just write in Rust, it's easier to build good software than either of these languages (yea, yea, do you data analyst stuff in python until you start using POLARS). At this point it's a far superior ecosystem from a developer experience point of view and the fact it's going to get you as close to efficient as possible without you thinking too far into it is a welcome side effect. Using VScode with the Sqlx package I g…
Are there any good interactive programming options in Rust? That's the main draw of a dynamic language like Python for ad hoc data science tasks, the semantics just lines up well with the highly iterative nature of the work.
Re: Python consumes 38x more energy than Java
#73Amazing. I have seen this list popping up in my LinkedIn feed for more than a year already and it keeps coming back. While any benchmark is of course interesting when considered on its own, the conclusions that people draw from this list tend to be complete nonsense: "Python is bad for the environment", "we should switch to language xxx to combat global warming" etc. First of all, especially for the slower languages…
I think you bring up a good point. Our economic system isn't designed to reward low energy consumption. In fact, GDP and energy usage are very tightly linked. And because we are seeking growth in GDP at a system level, we are doomed to use more energy.
Correlation or causation?
Re: Python consumes 38x more energy than Java
#74Just write in Rust, it's easier to build good software than either of these languages (yea, yea, do you data analyst stuff in python until you start using POLARS). At this point it's a far superior ecosystem from a developer experience point of view and the fact it's going to get you as close to efficient as possible without you thinking too far into it is a welcome side effect. Using VScode with the Sqlx package I g…
Do you use an extension other than just `rust-analyzer` in order to get compile-time errors for SQL with sqlx?
Re: Python consumes 38x more energy than Java
#75Amazing. I have seen this list popping up in my LinkedIn feed for more than a year already and it keeps coming back. While any benchmark is of course interesting when considered on its own, the conclusions that people draw from this list tend to be complete nonsense: "Python is bad for the environment", "we should switch to language xxx to combat global warming" etc. First of all, especially for the slower languages…
Re: Python consumes 38x more energy than Java
#76Amazing. I have seen this list popping up in my LinkedIn feed for more than a year already and it keeps coming back. While any benchmark is of course interesting when considered on its own, the conclusions that people draw from this list tend to be complete nonsense: "Python is bad for the environment", "we should switch to language xxx to combat global warming" etc. First of all, especially for the slower languages…
I think you bring up a good point. Our economic system isn't designed to reward low energy consumption. In fact, GDP and energy usage are very tightly linked. And because we are seeking growth in GDP at a system level, we are doomed to use more energy.
Re: Python consumes 38x more energy than Java
#77Re: Python consumes 38x more energy than Java
#78Earlier quoted context omitted.
You can’t use time command in this sort of benchmark. You are including start up t times here.
Startup times seem to be the same and also negligible: time python3 nothing.py 0.011s time php nothing.php 0.011s
Re: Python consumes 38x more energy than Java
#79Earlier quoted context omitted.
Thanks for this link. They also seemed to have avoided libraries like numpy. In my mind, python made it possible to hardware optimize with libraries like numpy quite easily. Avoiding it is a mistake. I'll try to see if I have time to play the game myself and throw my attempt in there.
But isn't what makes numpy efficient written in C?
FWIW if python provides an abstraction that keeps the code readable while keeping the efficiencies of C, I think that should count for python, not against it.
Re: Python consumes 38x more energy than Java
#80Earlier quoted context omitted.
Startup times seem to be the same and also negligible: time python3 nothing.py 0.011s time php nothing.php 0.011s
Startup time in Python depends on the program because Python compiles all modules to bytecode before executing them.
Similar for the PHP version.
python3 loop.py
3.450s
time php loop.php
0.469s
So PHP is 7x faster for the longer loop.