• @[email protected]
    link
    fedilink
    501 month ago

    “I’m writing a recursive method with threads to optimize the CPU usage in a 0.02%” THIS IS A NONSENSICAL STATEMENT MADE BY DERANGED PEOPLE

    I mean this is correct though

    • @stingpie
      link
      131 month ago

      Recursion makes it cheaper to run in the dev’s mind, but more expensive to run on the computer. Subroutines are always slower than a simple jump.

      • @pivot_root
        link
        61 month ago

        Recursion makes it cheaper to run in the dev’s mind, but more expensive to run on the computer.

        Maybe for a Haskell programmer, divide-and-conquer algorithms, or walking trees. But for everything else, I’m skeptical of it being easier to understand than a stack data structure and a loop.

    • @pivot_root
      link
      71 month ago

      Yeah, you have to be pretty deranged to mix multithreading and recursion together.