Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len()
JustAnotherKay@lemmy.world 3 days agoHonestly most people use Python because it has fantastic libraries. They optimize it because the language is middling, but the libraries are gorgeous
ThirdConsul@lemmy.ml 3 days ago
In C++ if I remember correctly…
JustAnotherKay@lemmy.world 3 days ago
What do I care what language the library is written in as long as it works for what I need it do?
sugar_in_your_tea@sh.itjust.works 3 days ago
Exactly! Most of the important libraries in other languages have Python support. So I can use Python and not care if they wrote the library in C++, Rust, or something more exotic, provided it works in Python.
Python is more about gluing stuff together than writing a bunch of greenfield logic. If you run into performance problems and you’re using Python, the best solution is to start rewriting the slow parts in something faster, not to rewrite the whole thing in something different.
That said, most of my personal projects are in Rust, for a variety of reasons. But I still use a lot of Python as well, and it’s what I use 99% of the time at work.
ThirdConsul@lemmy.ml 2 days ago
My point is tha the libraries itself are not in Python and thus most likely not exclusive to it. This is not an attack on Python, I just find it funny a bit :)