• Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    2
    ·
    9 hours ago

    yeah, sometimes it feels like the same people complaining about python speed are the ones writing “C” code in python.

    • ISO@lemmy.zip
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      9 hours ago

      What about the fact that runtime startup alone auto-disqualifies python for all short-lived process use-cases?

      Or the fact that you can’t do concurrency especially across the language barrier from another language without multiple python runtimes orchestrated with a queue and IPC because of possible process-wide global state and similar concerns/assumptions for any python library dependency that is not all native across its own dependency chain?

      “languages are just tools” and “use the right tool for the job” were already stupid catch phrases. Pretending languages don’t matter is a big further step into this shallow faux-intellectualism masquerading as wisdom.

      And we didn’t even get to low level stuff yet.

      • fruitcantfly@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        3 hours ago

        What about the fact that runtime startup alone auto-disqualifies python for all short-lived process use-cases?

        While Python’s start-up time is a lot slower than a corresponding compiled program, in most cases it’s not slow enough to matter even if the process itself is short-lived:

        $ hyperfine 'python3 -c "pass"'
        Benchmark 1: python3 -c "pass" (412 runs)
                        mean     ±       σ          min     …     max
          Wall Time      7.1 ms  ±     0.2 ms       6.7 ms  …     8.4 ms
          Memory         9.4 MiB ±     0.1 MiB      9.1 MiB …     9.5 MiB
        

        If you are running a small program so often that this kind of start-up time matters, then the loop should probably already be implemented in the program itself. In line with the article’s thesis

      • Pomal@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        8 hours ago

        At that point just call the person messy and move on. They just want to flex their brain.