‹ BackHN Continuity

Thread

Writing Efficient C++ Code (2013)

176 points · 161 comments · ibobev

  1. hn_submit · · focus · HN ↗
    I write in C++ almost every day but never have the need to optimize for speed. Even when you write straightforward code it's already blazingly fast.
    1. flowerbreeze · · focus · HN ↗
      When writing code for end-user applications, I think it's mostly true. When it's writing code for a database engine, a game engine, a 3d renderer, or anything else that involves heavy data processing, optimization is the core "thing" often and it might not even be a good enough solution without it. Although, a lot of time even then C++ is good enough even then when picking reasonable data structures to represent the data.
      1. hn_submit · · focus · HN ↗
        These are what I like to call "infinity applications" where the need for speed is essentially infinite.

        Even if you write them in hand-optimized assembly they would still clamor for more speed.

        1. flowerbreeze · · focus · HN ↗
          Oh, that's a great name for it! I'll need to start using it.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.