ARG’s Post

View organization page for ARG

1,366 followers

⚡ 1 billion nested loop iterations — language speed test ⚡ Some take milliseconds (C, Rust, Java, Go)… Others take coffee break levels of time ☕🐢 (Python, R). It’s a great reminder: ✅ Choose the right tool for the job ✅ Performance matters for heavy computation ✅ But developer productivity matters too #Programming #Performance #Benchmarks #SoftwareEngineering #Developers #RustLang #GoLang #Java #Kotlin #Python #NodeJS

  • No alternative text description for this image

If you are using python for a million item loop you are using it wrong, and also if you use C to start a ec2 machine with aws C library that you have to write than you are using it also wrong. Every language has its own area of strength.

show the code? Sounds impossible. If Node can do it 1s, surely python can.

anyone who has a use case with 1 billion loop in python would use a library which delegates that task to C and probably GPU.

Useless comparison. All depends of a goal - if you have to repeat certain action/calculation multiple time in prod , sure C or Rust is the choice. But if you simply wish to verify some idea, you nay spend huge amount of time of coding it to run very fust…just once, and find that idea was wrong🤷🏻♂️. While for the same time you might verify tens of ideas with Python.

I am surprised that this stupid animation is still making the rounds. For like the 1000th time: no one in their sane mind would ever run a complex computation in a Python for-loop. You have native libs for that, which Python integrates with. Instead of performing a complex calculation over billions of iterations in Python, you simply run a batch NumPy or Pandas operation that takes a few ms. Long live C and FORTRAN!

Despite a lot of ML libraries for python, it looks like there are previous and ongoing efforts to write ML/DL libraries for Java, and I find myself wondering if this is a fruitful direction. It seems easier to program in than C and C++, perhaps faster than Python, with more libraries than Julia: perhaps the perfect sweet spot? One of my own projects builds off of "Proximity Forests," originally developed in Java: https://github.com/KevinMoonLab/PF-GAP

Like
Reply

isn't python compiled... i don't believe this .. i also don't believe that php is that much slower than javascript

Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories