Optimization - gusenov/kb GitHub Wiki

Wikipedia

Mechanical Sympathy

Intel

Quotes

  • "Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%." (Donald Knuth)

Courses

I/O

  • jrtechs.net: Multi Threaded File IO
    • multiple threads don’t increase file throughput
      • HHD can only read one file at a time. Adding more CPU cores into the mix would actually slow down the file ingest because the HHD would have to take turns between reading fragments of different files. The seek speed of the HHD would heavily degrade the performance.
    • using the same number of threads as your computer has is the most efficient way to read in files
      • using more threads will decrease the idle time of the HHD.
      • If you use more threads than your CPU has, you will obviously suffer performance wise because the threads will be idle while they wait for each other to finish.