Skip to content

Commit

Permalink
[Chapter8] Added more TODOs and placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
dendibakh committed Mar 14, 2024
1 parent c23864a commit 8f0d3b9
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ One of the most important areas for alignment considerations is the SIMD code. W
__m512 * ptr = new __m512[N];
```
[TODO]: other data structure reorganization techniques:
* structure splitting
* field reordering
* pointer inlining
[TODO]: Trim footnotes
[^5]: The same applies to memory deallocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Secondly, it is possible to speed up allocations using custom allocators, for ex
### Tune the Code for Memory Hierarchy.

[TODO]: Elaborate more
[TODO]: Discuss what to do when memory bandwidth is a limitation

The performance of some applications depends on the size of the cache on a particular level. The most famous example here is improving matrix multiplication with [loop blocking](https://en.wikipedia.org/wiki/Loop_nest_optimization) (tiling). The idea is to break the working size of the matrix into smaller pieces (tiles) such that each tile will fit in the L2 cache.[^9] Most of the architectures provide `CPUID`-like instruction,[^11] which allows us to query the size of caches. Alternatively, one can use [cache-oblivious algorithms](https://en.wikipedia.org/wiki/Cache-oblivious_algorithm)[^19] whose goal is to work reasonably well for any size of the cache.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Workaround Memory Bandwidth Limitations

[TODO]: Discuss what to do when memory bandwidth is a limitation
Use smaller data types, e.g. fp16, or buy a better HW.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Non-temporal stores

0 comments on commit 8f0d3b9

Please sign in to comment.