Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to write fast (low level) code?
    text
    copied!<p>I would like to learn more about low level code optimization, and how to take advantage of the underlying machine architecture. I am looking for good pointers on where to read about this topic.</p> <p><strong>More details:</strong></p> <p>I am interested in optimization in the context of scientific computing (which is a lot of number crunching but <em>not only</em>) in low level languages such as C/C++. I am in particular interested in optimization methods that are not obvious unless one has a good understanding of how the machine works (which I don't---yet).</p> <p>For example, it's clear that a better algorithm is faster, without knowing anything about the machine it's run on. It's not at all obvious that it matters if one loops through the columns or the rows of a matrix first. (It's better to loop through the matrix so that elements that are stored at adjacent locations are read successively.)</p> <p>Basic advice on the topic or pointers to articles are most welcome.</p> <p><strong>Answers</strong></p> <p>Got answers with lots of great pointers, a lot more than I'll ever have time to read. Here's a list of all of them:</p> <ul> <li><a href="http://www.intel.com/intelpress/sum_swcb2.htm" rel="noreferrer">The software optimization cookbook</a> from Intel (book)</li> <li><a href="http://www.akkadia.org/drepper/cpumemory.pdf" rel="noreferrer">What every programmer should know about memory</a> (pdf book)</li> <li><a href="http://rads.stackoverflow.com/amzn/click/1593270658" rel="noreferrer">Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level</a> (book)</li> <li><a href="http://www.agner.org/optimize/" rel="noreferrer">Software optimization resources</a> by Agner Fog (five detailed pdf manuals)</li> </ul> <p>I'll need a bit of skim time to decide which one to use (not having time for all). </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload