Python is 71x Slower, Uses 75x More Energy, Than C

preview_player
Показать описание
Rust, Go, Swift, Dart, Ruby. All slower, & use more electricity, than plain old C.

More from The Lunduke Journal:
Рекомендации по теме
Комментарии
Автор

HolyC still the king.

HolyC performance so tremendous the study was afraid to include it.

odirex
Автор

All Hail Dennis Ritchie and his 50+ year old language that trumps all except, assembly..

mondskiez
Автор

Meanwhile the energy used to help the programmer with A"I" is dusting all the energy spent running the result.

armynyus
Автор

The reason people are able to get by with Python is because the Python libraries that are computationally expensive are written mostly in C or C++. Well, that and the whole "scalability" where people run 100 servers in a cluster to do the same thing 1 server could do if the application was well designed.

username
Автор

It's the degradation of the education system. Programming in C and other older languages is hard to do well. It takes time to learn and many will never become really good at it. Many of the newer languages have greatly reduced learning curves, but that is paid for in other ways and this illustrates those ways.

AL-kuzq
Автор

What about C being a "portable assembly language" don't people understand?

KevinInPhoenix
Автор

I mean nobody is using Python or something for high performance application, all of that is offloaded to an actual fast language. Python for "Script you may run a few times a day and completes in 50ms" prob uses less electricity all time than it would for your brain to sit down and spend the time to write it in C

Ganerrr
Автор

And writing C is a 100 times more fun!

CallousCoder
Автор

"Back in the day" when I programmed only on VAX/VMS, one day my boss came over all excited and made me come to his office. We often wrote our programs in VAX BASIC because it was just so darn powerful, but of course even back then the same concerns arose regarding memory, execution speed, etc. So he wrote a quick program that basically just counted to 100, 000, 000 or something like that printing the start time/end time. For the sake of argument (it has been 30+ years) BASIC took 20 seconds to run, COBOL took 15, Pascal took 7 and C took 1.5... but the REAL shocker was FORTRAN... it completed in 0 seconds. So we compiled/machine and looked at code generated by the compiler and found that FORTRAN was so smart it optimized out everything but the final value. :D

Tuishimi
Автор

a.) all rather academic usecases and
b.) nobody in their right mind uses pure python for heavy lifting. you use libraries.. which are written in C(++).

TheSwissGabber
Автор

Could you possibly add a link to the paper in the video description so that your viewers can go through the paper?

TheDredface
Автор

Pascal is better than many people give it credit for. After all these decades for it to still outshine most others speaks for itself.

originalTriniOne
Автор

Pascal can beat C. Nothing beats Pascal-C.

paulcosta
Автор

That's why Pythonists use C libs for any non trivial compute

ArtemMelanich
Автор

Would have been very nice to have zig in the comparison.

tiberiumihairezus
Автор

More than C being the best language, it's the C compiler being the best compiler.

mokalhor
Автор

Gotta keep in mind that even though Python itself may be extremely slow compared to something like C, a lot of the compute intensive Python libraries (think numpy, pytorch, etc.) actually make use of native C / CPython libraries behind the scenes, so the Python code itself doesn't really do a whole lot of computation in these scenarios, and is only used to interface with the more complex parts of a library.

xNaxdy
Автор

Microsoft and Intel will now collaborate to rewrite Windows in Lua.

javaman
Автор

I'm no expert, so feel free to chime in and add corrections. My understanding that adding abstraction slows down the computer. The problem with "Everyone should use C" argument based on power and time can be applied to people who code in assembly. We can go further, why not just code directly in binary if you want to go max speed and power savings? You won't need linkers or compilers. The obvious answer is that we want some level of convenience. The best language balances convenience with power saving and efficiency.
But once again, the more convenient a language is, the more abstract from computer code it is, and the less efficient in general it is.
The other question posed, will there be a faster language than C made? Possibly, but unlikely since it's a simplistic language that's fairly close to matching computer code. You'd need to get something closer to assembly like Fortran or something. I use C++ myself and am happy with it even if it's not the best. Anyway, that's my 2 cents.

televisedfeedback
Автор

So now we know why newer computers run slower than older computers despite being better, stronger, faster. 😊

ScottBaker_