• Hazzard@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Eh, the python one will probably perform better, because sum is probably written in native C under the hood.

    • jadero@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      I’ve yet to find a language where “doing it yourself” has higher performance than calling the built-in or library function. There are edge cases, but rarely enough to be bothered about.