-43

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?

you are viewing a single comment's thread
view the rest of the comments
[-] terabyterex@lemmy.world 25 points 3 days ago

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?

[-] ryokimball@infosec.pub 3 points 3 days ago

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

[-] insomniac_lemon@lemmy.cafe 1 points 3 days ago* (last edited 3 days ago)

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.

[-] CarlLandry357@lemmy.world 1 points 3 days ago

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.

[-] nagaram@piefed.social 1 points 2 days ago

Yeah you shouldn't be game deving with a scripting language. There's your problems!

[-] atzanteol@sh.itjust.works -2 points 3 days ago

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.

[-] FishFace@piefed.social 8 points 2 days ago

Yeah, want to take a bet on how long a single lookup in a dict with 5,000 entries takes on my machine?

How to sort and index it

It's a hash table. Can you explain why "sorting and indexing" would improve performance?

You're talking out your arse.

[-] atzanteol@sh.itjust.works 1 points 2 days ago

I mis-remembered, it was a linear search though a list rather than a dict that was the problem (I think it was a list because we were looking up multiple entries or something from a list of Objects based on a field). O(N) lookup to be sure so not well optimized. But on list of 100,000 items doing 100,000 lookups it is very slow - > 1 minute whereas in Java it was like a few seconds.

Yes - refactoring was the solution. I'm not saying it couldn't perform better and it did when we re-wrote it. But that's a low-enough number of items that it surprised me that it was a problem.

[-] FishFace@piefed.social 1 points 2 days ago

An order of magnitude difference between python and java would not surprise me at all, sure.

[-] atzanteol@sh.itjust.works 0 points 2 days ago

You’re talking out your arse.

And honestly - what do you expect for a response with a shitty attack like that? Do you need to be a dick?

[-] CarlLandry357@lemmy.world 0 points 3 days ago

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++.

[-] Ephera@lemmy.ml 5 points 3 days ago

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.

this post was submitted on 17 Jul 2026
-43 points (26.4% liked)

Programming

27766 readers
397 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS