I don't know why Python attracts so much negativity, after all, it plays an important role in CS: it is so sluggish when applied to trivial algorithms, that it forces its users to learn better and more complex methods to achieve minimally bearable performance for mundane activities.
Announcement
Collapse
No announcement yet.
Codon Looks Very Promising For Super-Fast Python Code
Collapse
X
-
I just hope it's actually sane to embed in programs. CPython is an absolute nightmare to embed for several reasons. Especially for Rust which doesn't really have any other decent scripting languages available, except maybe Lua (which I'm not a huge fan of). A huge problem is how the global lock is for the entire process, even other VM instances. The runtime is as insane and stupid as the language itself (but I'm not gonna lie, I don't know of a better scripting language, at least in terms of personal preference.)
Probably just going to go with a strongly-typed minimal Scheme-like custom language for my project. But I would have used something a little more standard if it existed and wasn't implemented by a psychotic chimp.
It's pretty insane how many dumb-as-bricks scripting languages exist that actually expect to be used independently and make embedding them a second thought, if not impossible. Like, what else is it gonna be used for?
Comment
-
Originally posted by bachchain View Post
The best compiler in the world can't make up for how Python completely destroys caches and prefetchers by indirecting literally everything
Python is slow? No, CPython interpreter is.
Python has the GIL? No, CPython interpreter has the GIL.
Said so, others are language-specific features (like late dynamic binding of functions) that prevent interpreter/compiler fine-tuning optimizations. But in general I see no reasons why an hypotetical full-featured Python compiler could not produce a machine-language binary which is in the same order of magnitude in terms of speed of C/C++
- Likes 3
Comment
-
Originally posted by acobar View PostI don't know why Python attracts so much negativity, after all, it plays an important role in CS: it is so sluggish when applied to trivial algorithms, that it forces its users to learn better and more complex methods to achieve minimally bearable performance for mundane activities.
I mean, most mundane activities don't need such horsepower and are set up in python in five minutes, something that C/C++ would require hours or days of work.
There are thousands of applications that are wrote in Python and they work perfectly well; of course if you want to implement an mp3/aac/vorbis integer-only audio bitstream encoder, perhaps Python is the wrong tool.
- Likes 1
Comment
-
Originally posted by blackshard View Post
Perhaps you're using the wrong tool for the wrong activity?
I mean, most mundane activities don't need such horsepower and are set up in python in five minutes, something that C/C++ would require hours or days of work.
There are thousands of applications that are wrote in Python and they work perfectly well; of course if you want to implement an mp3/aac/vorbis integer-only audio bitstream encoder, perhaps Python is the wrong tool.
You seem to like and care for Python, that's OK, but because I used to code on Fortran, C and C++, I have a particular perspective and expectations, including performance, about a language that, until now, can't be fulfilled by Python. Right now, every single thing that puts real pressure on computing (and computers) needs to be coded on some other language, usually Fortran or C, and then a wrapper must be construed, and then, a translation layer must be used to send data back and forth, this is really wasteful. But, OK, we have fast computers and plenty of memory.
To be clear, I don't dislike the language, but we need to acknowledge that it has a lot of shortcomings when we think about what a general programming language should offer, even from stability and maintenance POV for the source code of our projects.
Let's see how Codon evolves. Perhaps, it may shuffle and change things a bit.Last edited by acobar; 18 March 2023, 09:39 PM.
- Likes 1
Comment
-
Why do poor syntax programming languages get all the love. Python and Rust has icky syntax, but is all the rage. JavaScript is the cleanest and most logical language I've ever used.
C++ I have a love and hate relationship. Often you can make really nice code. But when a library is introduced or something dynamic - it starts to get messy. Along with a lot of recent additions to the language.
Last edited by Turbine; 22 March 2023, 06:54 AM.
Comment
-
I'm not a fan of these Python compilers. Python is a great language for developer productivity, but the limitation is when you need ultimate level performance, at which point you can either augment with Python C modules API (which also have limitations), or just use C or C++ to write your entire application. If your developers are not smart enough to be productive with, and write something stable in C or C++, I have to question if you really need "close to metal" performance at all.
- Likes 1
Comment
-
Originally posted by Barnacle View PostI'm not a fan of these Python compilers. Python is a great language for developer productivity, but the limitation is when you need ultimate level performance, at which point you can either augment with Python C modules API (which also have limitations), or just use C or C++ to write your entire application. If your developers are not smart enough to be productive with, and write something stable in C or C++, I have to question if you really need "close to metal" performance at all.
Comment
Comment