• GissaMittJobb@lemmy.ml
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 days ago

    I mean, putting in a bit of thinking before you actually hit the keyboard can be an incredibly effective form of optimization, if you can get for example an O(n^2) down to an O(log n). You’ll even save time on not having to rework the thing later, and if you build on poor foundations, chances are you’ll stumble upon fundamental architectural challenges down the road, which can be extremely costly in terms of development time.

    • Badabinski@kbin.earth
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      Yep, taking some care early on can pay dividends down the road. The data structures you choose really matter, and YAGNI can stop you from going overboard with indirection and other shit. Premature optimization is bad, but there’s nothing wrong with writing performant software as long as it’s still comprehensible and extensible.