• UndercoverUlrikHD@programming.dev
    cake
    link
    fedilink
    arrow-up
    2
    ·
    5 days ago

    The author pointed out how exceptions are often faster than checking every value. If your functions throws an error often enough that Exception handling noticeably slow down your program, surely you got to take a second look at what you’re doing.

    • BatmanAoD@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      4 days ago

      It depends what kind of errors you’re talking about. Suppose you’re implementing retries in a network protocol. You can get errors pretty regularly, and the error handling will be a nontrivial amount of your runtime.