Go is 17 times more sustainable than Python
sustainful.tech
sustainful.tech
Is it? Do you have references? Isn't all the number crunching written in C++ and "only" the orchestration in Python?
But essentially it is a reasonable view.
There were already studies about energy consumption related to programming languages, see https://www.sciencedirect.com/science/article/pii/S016764232... and https://dl.acm.org/doi/abs/10.1145/3136014.3136031.
In the 2017 version of the study Go is far behind Rust or even Java, and there is even a factor 23 (instead of 17) from Go to Python in energy consumption. So if you really want to reduce the CO2 footprint then you should rather use Rust or C++ instead of Go, where the factor is about 76.
And yes I say that even though Rust performs very well in it.
Furthermore, there’s very weird results as well. Why is TypeScript so much worse than JavaScript? TypeScript is a superset of JavaScript and compiles to it. The JavaScript program could be exactly the same as the TypeScript one, but isn’t for some reason.
It’s been a while and I’m on my phone so I can’t check, but IIRC the reason the above is even a question is that they made a benchmarking framework but didn’t share it, so nobody can reproduce their results.
Typescript produces garbage JS output that creates all sorts of weird bugs, hiccups and strange quirks. It doesn't surprise me that TS generated JS would perform much worse than directly written JS.
It wouldn’t shock me that there were differences if you used a bunch of fancy TypeScript features, but at the limit I would expect no overhead if you don’t use any of them. Maybe that expectation is misguided.
All Deep Learning libraries use C++ in the backend.
This kind of "bloggers" personifies everything that is wrong with blogging nowadays.
They essentially say that in python most of the time is spent doing python work, while in go, most of the time is spent in the math calculations. That’s only true because so little calculation happens in this toy model. Scale it up to a realistic model, and python vs go should become a rounding error.
I also take issue with the conflation of sustainability and speed.
They should have used pytorch or tensorflow if they knew what they were doing.
Nobody uses Numpy for Deep Learning.
This article is completely pointless as is.
time python min.py
New synaptic weights after training:
[[ 9.67300549]
[-0.20838755]
[-4.62931838]]
Considering new situation [1, 0, 0] -> ?:
[0.99993704]
python min.py 0.35s user 1.07s system 756% cpu 0.188 total
No. Python is not 17x times slower. Author did just a irreproducible performance research.This article really just reads like there is some internal griping about not using Python.