Earlier quoted context omitted.
use in what ? I severely doubt anything I do touches fortran millions times a day unless it's google search that runs on it.
Your weather report
Python consumes 38x more energy than Java
91–100 of 142 posts
Re: Python consumes 38x more energy than Java
#92This is why I'm learning Rust: C# gives fast development speeds than Python with decent performance. Python and Go for when their native libraries smoke C# and now Rust for performance or low level.
Re: Python consumes 38x more energy than Java
#93Re: Python consumes 38x more energy than Java
#94While Java's compiler or JIT is probably one of the most optimized softwares in existence, how do we measure, what overhead the language nudges the programmers to build? I am thinking of AbstractProviderFactoryProxy and similar. Or that for a very long time it forced you (or still does to a degree) to put everything into classes, breeding 1 or 2 generations of programmers, who see a noun and jump to making a class an…
Re: Python consumes 38x more energy than Java
#95Earlier quoted context omitted.
Please explain how "AbstractProviderFactoryProxy" is related to the language. I have taken over as lead for a Python project and what I see all the Java problems people used to make fun of (none have worked in Java before) and worse. On top, everything has an interface starting with "I", C# style. Methods in entities, service classes are instantiated with state etc. And side-effects are all over the place. If you are…
> Please explain how "AbstractProviderFactoryProxy" is related to the language. The language Java did, until some time ago, not allow you to pass functions as arguments. You had to make an anonymous inner class for example, satisfying some interface. Many design patterns are very much oriented towards a language like Java, which does/did not allow for higher order functions. Take the visitor pattern for example. It w…
(It is replaced/has an exact analog with pattern matching though. Thankfully, Java has that available nowadays as well).
Re: Python consumes 38x more energy than Java
#96Amazing. 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 would add that proof of work algorithms (Bitcoin type) where the goal is to endlessly compute hashes with no real computational productivity gain are the real offenders, regardless of which language they're written in.
Most of the implementations for LLMs runtimes I know of are Python using PyTorch. I believe most of the heavy lifting is written in C++ (llama.cpp), though.
Re: Python consumes 38x more energy than Java
#97Earlier quoted context omitted.
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.
> GDP and energy usage are very tightly linked Correlation or causation?
Energy consumption is a result of labor applied to tools and technology for production. It is not mere correlation, but it is also not the cause, it is one measurable downstream effect.
China, in fact, used energy consumption as the measure for GDP reporting. For this reason, local leadership in cities and provinces would game the system by running the coal plants at peak and turning on all lights in a city day and night to juice the numbers so they'd show higher GDP (Beijing used to do this before they hosted the Olympics, for example).
Re: Python consumes 38x more energy than Java
#98Earlier quoted context omitted.
But isn't what makes numpy efficient written in C?
Well, the Java source uses threads. Guess how that's implemented. 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
#99Earlier quoted context omitted.
Are you sure you've looked inside all those .dlls and .sos you use every day? At the end of the day Fortran is compiled and it can just create dynamic libraries which program you use depend on, and you'd never know. Heck, I wouldn't bet against using me using at least 1 Cobol library once per month, you never know what kind of craziness is going on behind the scenes.
Yes. No fortran there
Re: Python consumes 38x more energy than Java
#100Just 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…
It will require you to write more correct code, so the end product is more likely to come out better. But it is not easy, even for building "good" software. (Assumption: "good" := correct, maintainable, efficient, and robust -- Rust nails the efficient part.)