• merc@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      For a long time I’ve been of the opinion that you should only ever optimize for the next sucker colleague who might need to read and edit your code. If you ever optimize for speed, it needs to be done with massive benchmarking / profiling support to ensure that the changes you make are worth it. This is especially true with modern compilers / interpreters that try to use clever techniques to optimize your code either on the fly, or before making the executable.

      • Klear@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        The first rule of optimization: Don’t do it
        The second rule of optimization: Don’t do it yet (experts only)