Console? good, GUI? good, game dev? use Godot engine with its similar language Gdscript, but what else? Ive been seeing AI, Data Science stuff, but whats the point if ita slow?
Console? good, GUI? good, game dev? use Godot engine with its similar language Gdscript, but what else? Ive been seeing AI, Data Science stuff, but whats the point if ita slow?
define slow.
my life has been in C style languages but even i kniw python us a great general purpose language. are you going to use it for high frequency trading? no but most things dont need that speed.
yes its used a lot in ai but also for a ton of linuc scripting. i dont think anyone uses perl anymore.
so in what way was it slow when you used it? what micro seconds were you lookong for?
I started off with programming languages that compiled into binaries. I knew dos and bash well enough but wanted the convenience of scripting, just type in run, no compiling needed. I also wanted it to be cross-platform.
I chose Perl. TBH I loved it, but I kept hearing about all the cool things that would come as soon as Perl 6 was released, so I started waiting, and waiting, and waiting…
The XKCD comic, import antigravity, is literally what convinced me to try python finally. Haven’t really looked back, even 13 years later when Perl 6 was finally released
Python is slow enough to notice in fairly normal usage. Just doing lookups into a dict with thousands of entries, for example, will lead you to researching how to sort and index it.
Python’s great as an interface to C which gives it the illusion of performing well.
Yeah, want to take a bet on how long a single lookup in a dict with 5,000 entries takes on my machine?
It’s a hash table. Can you explain why “sorting and indexing” would improve performance?
You’re talking out your arse.
This probably depends on what CPU someone has, someone with a higher-end CPU (higher-IPC/higher clockspeed) probably will have a better experience.
On older/lower-end CPUs it is more common to see when something is single-threaded especially when it’s also interpreted. Particularly any type of generator/loader, filter, renderer, live audio. Which to be clear, is from a user perspective.
I think with newer CPUs Python’s current speed will be less of a problem but if your intention is game dev I think this is not enough.
I wrote a console tictactoe game with primitive AI opponent using both Python and C++ and python takes more time in the background process before making a move than in C++.
Yeah, computationally intensive stuff is going to be slow when implemented in Python. You will find lots of data science libraries for Python that do computationally intensive stuff, but they’re then generally implemented in C/C++ or Rust, with only a thin API layer written in Python.