News for hackers. Stuff that matters.
Re:Why Python keeps growing, explained by loudmax on Friday March 03, 2023 @08:11AM (#35009096)
You won't get high performance out of Python directly, but there are a lot of Python libraries that use C or a powerful low level language underneath. The heavy lifting in so much of machine learning is CUDA, but most people involved in ML are writing Python.
Re:Why Python keeps growing, explained by moffkalast on Friday March 03, 2023 @08:13AM (#35009115)
Sure, but what's not really python per se. One could also call C++ libraries from java via JNI and pretend java is super fast.

If people write program logic in python it will run at python speeds. Otherwise you're not really writing python, like nobody says some linux native program is bash because it happens to be launched from a bash script.

Re:Why Python keeps growing, explained by martopix on Friday March 03, 2023 @08:24AM (#35009246)
> Sure, but what's not really python per se.

But that's exactly the strength of Python: it's an interface language. It's meant to make pretty sophisticated things like CUDA easy for everyone.

Re:Why Python keeps growing, explained by kaba0 on Friday March 03, 2023 @09:22AM (#35009960)
Java is super fast though, it almost never uses JNI as it doesn’t need it as opposed to Python. It uses JNI for integrating with the C world (e.g. opengl bindings).
Re:Why Python keeps growing, explained by yamtaddle on Friday March 03, 2023 @02:50PM (#35014173)
> Sure, but what's not really python per se. One could also call C++ libraries from java via JNI and pretend java is super fast.

But that's how every scripting language obtains good-not-just-decent performance. A strong culture of dropping down to C for any halfway-important library is why PHP's so hard to beat in real-world use, speed-wise (whatever its other shortcomings).