read specifically
>people use it for data science and shit because its easy to use, but it's still terribly inefficient
also you can do that in C with the stdlib and gain a ton of efficiency over your "pandas" library (which is inevitably bloat)
The only language you'll ever need
Show the code or shut up. Then compare performance.
ftfy
Jokes on you, all the data science parts are written in C.
Python is great as a scripting language for doing shit with files and strings, and as a wrapper around a BLAS and other compute heavy stuff written in C. Python sucks in a vacuum because it has some really fucking retarded design decisions that kill it's ability to do anything interesting that doesn't rely on separate C modules. For example, there are no primitive datatypes, everything is boxed including things like ints. That means if you have code that repeatedly modifies an int (like summing an array), the int won't end up in the cache, instead the box around it will, and each write to the int requires a pointer to be followed into main memory rather than just updating it locally. Another stupid decision is the global interpreter lock, which precludes any meaningful form of concurrency as only one thread can actually be in the interpreter at a time. Python is filled to the brim with shit like this where they sacrificed functionality and performance for ease of use in a way that poses a real problem to programmers looking to solve everyday problems.
>data science parts are written in C
I'm so tired of you jokesters implying that because you're using a C library you will get anywhere near the efficiency of plain C
You can use multiprocessing rather then multithreading to get rid of GIL though
Have you actually benchnarked it?
On my machine numpy matmul takes 8% longer than just calling the BLAS directly. Python is basically relegated to passing pointers around and 90% of the execution time is spent in compiled C.
True, but there is probably a way structure the interpreter to allow for normal multithreading but they chose not to do it and instead have people work around the GIL by starting multiple copies of the interpreter. That said I don't actually know a whole lot about the python interpreter, so maybe there is some compelling reason that I'm not aware of.
youtube.com
The only language you'll ever need.
Yeah you're right. Its basically an ancient decision by Guido fucker to have a single interpreter thread and they were too lazy to rewrite the whole thing to fix that. Idk why do they still suck his cock in 2019