Commit 6bbaeea
perf(generator): add aggressive inlining to SerializeImpl/DeserializeImpl methods
Add MethodImpl(AggressiveInlining) attribute to generated Impl methods:
**SerializeImpl:**
- Mark SerializeImpl with AggressiveInlining attribute
- Ensures JIT compiler inlines these methods at call sites
- Critical for sealed type optimization to eliminate delegate overhead
**DeserializeImpl/DeserializeImplRef:**
- Mark both DeserializeImpl and DeserializeImplRef with AggressiveInlining
- Enables direct inlining when called from generated code
- Reduces call stack depth for sealed/struct deserialization
These attributes work in conjunction with the sealed type inlining optimization
to ensure the JIT can inline the complete serialization/deserialization logic,
eliminating all delegate and method call overhead for maximum performance.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c6bc61f commit 6bbaeea
2 files changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
0 commit comments