Hacker News new | ask | show | jobs
by Rochus 513 days ago
Is it? Python requires twenty times more computing time to solve the same problem. You could argue that there are much more browser JS users than python users. I don't have the numbers, but I guess with all the deep learning number crunching, the Python share is quite significant. Or what is your assumption based on?
1 comments

Transmitting data across the internet requires energy, plus JS is JIT/compiled every time it's run. Popular websites load up on JS, so it uses quite a bit.

I was under the impression that Python's serious number crunching ultimately happens in modules written in another language like CUDA. If it couldn't be tied together with Python, it would be in another language.

There was a peer-reviewed paper about energy efficiency of programming languages some years ago (see https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/pap...). A JIT seem to have little influence on energy efficiency; there are even big differences between jitted languages; but Python is on the second last place. I have no numbers on what percentage Python itself contributes to the deep learning number crunching; but according to the paper, the overall use of JS could be twenty times higher than that of Python to cause the same energy consumption. Maybe someone has the numbers.