Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakobnissen/hardware_introduction
What scientific programmers must know about CPUs and RAM to write fast code.
https://github.com/jakobnissen/hardware_introduction
Last synced: about 1 month ago
JSON representation
What scientific programmers must know about CPUs and RAM to write fast code.
- Host: GitHub
- URL: https://github.com/jakobnissen/hardware_introduction
- Owner: jakobnissen
- Created: 2020-04-14T13:38:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-11-14T10:07:16.000Z (12 months ago)
- Last Synced: 2024-08-01T16:45:18.926Z (3 months ago)
- Language: Julia
- Homepage:
- Size: 578 KB
- Stars: 427
- Watchers: 19
- Forks: 36
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What scientists must know about hardware to write fast code
This document is hosted at https://viralinstruction.com/posts/hardware/
It is written as a [Pluto notebook](https://plutojl.org). If you can, I recommend running the code in a Pluto notebook so you can play around with it and learn. Alternatively, you can read the HTML file in your browser.
PRs are welcome.
### This notebook covers:
* Why you must limit your disk read/writes
* What a CPU cache is, and how to use it effectively
* Memory alignment
* How to read assembly code and why you must do it
* Why you should reduce allocations
* Why immutable datastructures usually are fastest
* SIMD vectorization
* Struct of arrays vs array of structs
* Specialized CPU instructions
* Function inlining
* Loop unrolling
* Branch prediction
* The effects of memory dependencies in the CPU pipeline
* Multithreading
* Why GPUs are fast at some things and slow at others