Skip to content

Commit

Permalink
Added page pointer cache type
Browse files Browse the repository at this point in the history
  • Loading branch information
diondokter committed Feb 6, 2024
1 parent 60267b3 commit f93c519
Show file tree
Hide file tree
Showing 6 changed files with 394 additions and 63 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,20 @@ Instead, we can optionally store some state in ram.

These numbers are taken from the test cases in the cache module:

| Name | Map # flash reads | Map flash bytes read | Queue # flash reads | Queue flash bytes read |
| -------------: | ----------------: | -------------------: | ------------------: | ---------------------: |
| NoCache | 100% | 100% | 100% | 100% |
| PageStateCache | 77% | 97% | 51% | 90% |
| Name | RAM bytes | Map # flash reads | Map flash bytes read | Queue # flash reads | Queue flash bytes read |
| ---------------: | -------------: | ----------------: | -------------------: | ------------------: | ---------------------: |
| NoCache | 0 | 100% | 100% | 100% | 100% |
| PageStateCache | 2 * num pages | 77% | 97% | 51% | 90% |
| PagePointerCache | 10 * num pages | 69% | 89% | 35% | 61% |

#### Takeaways

- PageStateCache
- Mostly tackles number of reads
- Very cheap in RAM, so easy win
- PagePointerCache
- Very efficient for the queue
- Minimum cache level that makes a dent in the map

## Inner workings

Expand Down
Loading

0 comments on commit f93c519

Please sign in to comment.