‹ BackHN Continuity

Thread

Writing Efficient C++ Code (2013)

176 points · 161 comments · ibobev

  1. 112233 · · focus · HN ↗
    "This article was originally published in Polish in issue 4/2013" — a lot of excellent advice. Sad to see C++ have moved in last decade in a direction that makes writing efficient, simple low level code harder and harder :(
    1. fooblaster · · focus · HN ↗
      How? you can write exactly the same low level code today.
      1. AlotOfReading · · focus · HN ↗
        Shot in the dark, but maybe the OP is referring to the fact that these code conventions are explicitly discouraged by the C++ core guidelines. The SoA example falls afoul of the rule requiring T* to be used only for singular object pointers, for example.
        1. someonebaggy · · focus · HN ↗
          Core guidelines, and any other pattern document, should be downstream of working code, not upstream.
          1. AlotOfReading · · focus · HN ↗
            Okay? The point of the guidelines is to document principles the committee's thinks "good" C++ should follow, within the much larger universe of possible C++ code.
            1. tcfhgj · · focus · HN ↗
              the CCG isn't from the committee, but from Bjarne Stroustrup and Herb Sutter.

              Bjarne is often in disagreement with the committee

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.