Hacker News new | ask | show | jobs
by tillulen 834 days ago
I admire Daniel Lemire’s work on SIMD implementations. [Lemire]

[Lemire] https://lemire.me/en/#publications

I learn a lot by reading my compiler’s and profiler’s documentation.

For Rust, the Rust Performance Book by Nicholas Nethercote et al. [Nethercote] seems like a nice place to start after reading the Cargo and rustc books.

[Nethercote] https://nnethercote.github.io/perf-book/

Algorithms for Modern Hardware by Sergey Slotin [Slotin] is a dense and approachable overview.

[Slotin] https://en.algorithmica.org/hpc/

Quantitative understanding of the underlying implementations and computer architecture has been invaluable for me. Computer architecture: a quantitative approach by John L. Hennessy and David A. Patterson [H&P] and Computer organization and design: the hardware/software interface by Patterson and Hennessy [P&H ARM, P&H RISC] are two introductory books I like the best. There are three editions of the second book: the ARM, MIPS and RISC-V editions.

[H&P] https://www.google.com/books/edition/_/cM8mDwAAQBAJ

[P&H ARM] https://www.google.com/books/edition/_/jxHajgEACAAJ

[P&H RISC] https://www.google.com/books/edition/_/e8DvDwAAQBAJ

Compiler Explorer by Matt Godbolt [Godbolt] can help better understand what code a compiler generates under different circumstances.

[Godbolt] https://godbolt.org

The official CPU architecture manuals from CPU vendors are surprisingly readable and information-rich. I only read the fragments that I need or that I am interested in and move on. Here is the Intel’s one [Intel]. I use the Combined Volume Set, which is a huge PDF comprising all the ten volumes. It is easier to search in when it’s all in one file. I can open several copies on different pages to make navigation easier.

Intel also has a whole optimization reference manual [Intel] (scroll down, it’s all on the same page). The manual helps understand what exactly the CPU is doing.

[Intel] https://www.intel.com/content/www/us/en/developer/articles/t...

Personally, I believe in automated benchmarks that measure end-to-end what is actually important and notify you when a change impacts performance for the worse.