And honestly, that would be an improvement. The trend seems to be to write more and more applications in JavaScript with Electron [1], which I unrigorously assume uses 10 to 100 times the memory and CPU of an equivalent Python app (given Electron apps seem to most frequently make my fan spin or have some kind of memory leak requiring a force-kill).
[1] Now ranking higher on Google than the subatomic particle: https://www.google.com/search?q=electron (https://archive.ph/J2HYI)
I have no idea about memory consumption. I assume Python does better than Javascript there due to reference counting.
I suspect that Electron apps are so easy to create and run somewhat acceptably, that the trend is for the developer to add more bloat than would otherwise be there. So a very efficient runtime leads to developer laziness.
Well, that's how you judge a language. You write code in it, as opposed to writing it in some different language not under consideration.
But a much worse problem seems to be the fact that binary-trees is not much of a representative benchmark. It's mostly a benchmark of your memory management. Unless your programs spend 80% of their time managing memory, they'll probably not match the results of binary-trees.
it is trivial* to add C code to Perl, even when using XS, I guess it is as easy to do the same for Python
if you do heavy computations in pure Perl5 or pure Python you're doing it wrong by definition
*assuming you can write C
With the exception of shell languages (and its overstated even there), the description “scripting language” is usually wrong and at extremely deceptively reductive, even for languages where that was a motivating or at least early major use case.
> their energy savings come from the fact that the programmer is typically the only person who will be running it,
Even when languages are used for scripting, that's not true.
The Python (programming language) is. Ok, if you want to get pedantic you can talk about the language vs interpreter vs ecosystem? I'm not sure what you are getting at.
> It powers many many websites including Youtube. It's a full power limitless language.
Lots of things "power" Youtube. I'm not sure how that's important to point out.
Unless you want to do something crazy like run 2 threads at the same time
And this was such a scalability problem that Youtube decided to spend the unimaginable amount of pain and suffering to rewrite in C++.
A major problem with scalability at Google is that the CPU heavy stuff has often already been isolated and what is actually needed is a sort of ambient performance rather than just focusing on hot loops.