Commit 3f2e8b5
committed
Manually inlined lfs3_file_crystallize into lfs3_file_flush_
This was the main culprit behind our stack increase. Inlining
lfs3_file_crystallize into lfs3_file_flush_ adds a bit of code, but as a
tradeoff:
- Keeps all lfs3_file_crystallization_ calls at the same abstraction
level, which is generally easier to reason about and avoids issues
with things like lfs3_alloc_ckpoints.
- Makes some low-level interactions, such as LFS3_o_UNCRYST masking,
more obvious.
- Reduces the stack hot-path by the cost of lfs3_file_flush_
Saves some stack at a code cost:
code stack ctx
before: 37492 2464 656
after: 37504 (+0.0%) 2448 (-0.6%) 656 (+0.0%)
Now that the dust has settled a bit, we can also compare the lazy
grafting vs lazy crystallization builds:
code stack ctx
lazy-graft: 38020 2456 656
lazycryst: 37504 (-1.4%) 2448 (-0.3%) 656 (+0.0%)1 parent 35e4073 commit 3f2e8b5
1 file changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13095 | 13095 | | |
13096 | 13096 | | |
13097 | 13097 | | |
13098 | | - | |
13099 | | - | |
13100 | | - | |
| 13098 | + | |
| 13099 | + | |
| 13100 | + | |
| 13101 | + | |
| 13102 | + | |
| 13103 | + | |
| 13104 | + | |
| 13105 | + | |
| 13106 | + | |
| 13107 | + | |
| 13108 | + | |
13101 | 13109 | | |
13102 | 13110 | | |
13103 | 13111 | | |
| |||
13138 | 13146 | | |
13139 | 13147 | | |
13140 | 13148 | | |
13141 | | - | |
| 13149 | + | |
13142 | 13150 | | |
13143 | 13151 | | |
13144 | 13152 | | |
| |||
13451 | 13459 | | |
13452 | 13460 | | |
13453 | 13461 | | |
| 13462 | + | |
| 13463 | + | |
13454 | 13464 | | |
13455 | 13465 | | |
13456 | 13466 | | |
| |||
13479 | 13489 | | |
13480 | 13490 | | |
13481 | 13491 | | |
13482 | | - | |
13483 | 13492 | | |
| 13493 | + | |
13484 | 13494 | | |
13485 | 13495 | | |
13486 | 13496 | | |
| |||
0 commit comments