diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2024-11-14 04:36:42 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2024-11-14 04:38:15 +0000 |
| commit | d79dc87fa59e4b8614b56e57b84b4cb391bcc8f7 (patch) | |
| tree | 715c1c60386bbf12e46b311fb0217b3357bc3a7b | |
| parent | b04db1ad5b30278a7b4ccb907d8483c61442c6a5 (diff) | |
| download | go-x-proposal-d79dc87fa59e4b8614b56e57b84b4cb391bcc8f7.tar.xz | |
design/70257-memory-regions.md: add CPU effect model
This was accidentally removed when copying from a Google Doc. Whoops.
Change-Id: I659f3c3c08e3b632d4d4aa39d2487d790ffdd44b
Reviewed-on: https://go-review.googlesource.com/c/proposal/+/627538
Reviewed-by: Michael Knyszek <mknyszek@google.com>
| -rw-r--r-- | design/70257-memory-regions.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/design/70257-memory-regions.md b/design/70257-memory-regions.md index 276721a..896ecfd 100644 --- a/design/70257-memory-regions.md +++ b/design/70257-memory-regions.md @@ -597,6 +597,19 @@ the best, worst, and middling cases. - _CR_ = Relative cost of mark/sweep of region objects (expected >1) - _PF_ = Pointer density (per byte) of faded objects +| ΔCPU time \= | | +| :---- | :---- | +| immixAllocCPU(*OR* \* *AO*, *BR* \* *AB*) | Objects in a region are bump-pointer allocated | +| \+ heapAllocCPU((1 \- *OR*) \* *AO*, (1 \- *BR*) \* *AB*) | Cost of allocating non-region-managed objects | +| − heapAllocCPU(*AO*, *AB*) | Gain over heap-allocating all objects | +| \+ total GC time \* (1 \- *BR*) | Cost of mark/sweep of non-region objects | +| \+ total GC time \* *BR* \* (*BF* \+ *BS*) \* *CR* | Cost of mark/sweep of faded region objects | +| − total GC time | Gain over mark/sweeping all objects | +| \+ wbTestTime \* \# of pointer writes \[ \* *OR* \] | Cost of write barrier test (upper bound) \[[scaled](#minor-model-deviation)\] | +| \+ fadeCPU(*AO* \* *OR* \* *OF*, *PF* \* *AB* \* *BR* \* *BF*) | Cost of fading objects (write barrier slow path) | +| \+ regionCleanupCPU(*AB* \* *BR*) | Cost of eagerly sweeping a region when it ends | +| − TODO Cache benefit of prompt reuse | | + _BS_ is defined a little strangely, but can be considered as a proxy for average region lifetime. |
