Commit 698986d
committed
perf(profiling): add #[inline] to RefCellExt trait methods
The RefCellExt trait is used at 20+ call sites across the codebase.
Add #[inline] attribute to:
- try_with_borrow and try_with_borrow_mut in impl block
- borrow_or_false and borrow_mut_or_false default methods
This allows LLVM to inline these small wrapper functions at call sites,
eliminating the trait dispatch overhead in optimized builds.1 parent 3df3a27 commit 698986d
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| 474 | + | |
474 | 475 | | |
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
| 482 | + | |
481 | 483 | | |
482 | 484 | | |
483 | 485 | | |
| |||
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
| 492 | + | |
490 | 493 | | |
491 | 494 | | |
492 | 495 | | |
| |||
496 | 499 | | |
497 | 500 | | |
498 | 501 | | |
| 502 | + | |
499 | 503 | | |
500 | 504 | | |
501 | 505 | | |
| |||
0 commit comments