‹ BackHN Continuity

Thread

Writing Efficient C++ Code (2013)

176 points · 161 comments · ibobev

  1. MaxBarraclough · · focus · HN ↗
    There's no mention of branch prediction, or context switching, or synchronisation. Depending on what you're doing, they could be very consequential. There's only very brief mention of parallelisation with threads and with SIMD.

    High-performance programming is a big topic. The scope is far too broad for a single blog post, which naturally gives only cursory discussion of C++ and computer architecture. The article isn't bad considering, but I do think it's the wrong format. A blog series, or even a book, would be more fitting.

    1. creata · · focus · HN ↗
      They're a bit old and missing some details, but I like Agner Fog's manuals.

      <a href="https:&#x2F;&#x2F;www.agner.org&#x2F;optimize&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.agner.org&#x2F;optimize&#x2F;

      1. MaxBarraclough · · focus · HN ↗
        I&#x27;ve not read Fog&#x27;s Optimizing software in C++ but I see it&#x27;s freely available there as a PDF (182 pages). Looks like a great resource on these topics.

        <a href="https:&#x2F;&#x2F;www.agner.org&#x2F;optimize&#x2F;optimizing_cpp.pdf" rel="nofollow">https:&#x2F;&#x2F;www.agner.org&#x2F;optimize&#x2F;optimizing_cpp.pdf

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.