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?

  • terabyterex@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    29 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?

    • atzanteol@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 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
        link
        fedilink
        English
        arrow-up
        2
        ·
        29 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
          link
          fedilink
          English
          arrow-up
          0
          arrow-down
          1
          ·
          29 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.worldOP
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      29 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
        link
        fedilink
        arrow-up
        1
        ·
        29 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.