Commit 5d28c4e
perf(benchmark): enhance polymorphic serialization benchmarks
Expand polymorphic benchmark to comprehensively test serialization
libraries' handling of polymorphism across deep inheritance hierarchies.
Changes:
- Add 20 polymorphic types (FooA-FooZ) with inheritance depth up to 9 levels
- Update PolymorphicClass to include List<PolymorphicFooBase> and nested
polymorphic structures (FooD with multiple Transform fields)
- Add constructor to PolymorphicTransform for easier initialization
- Create three distinct benchmark test suites:
1. Single polymorphic class with 1000 nested polymorphic elements
2. Array of 1000 base type elements containing diverse derived types
(key test for polymorphism handling at different inheritance depths)
3. Array of 100 polymorphic classes each with 50 nested elements
These benchmarks effectively stress-test how Nino, MemoryPack, and
MessagePack handle polymorphic type resolution, deep inheritance chains,
and mixed-type collections.
Co-authored-by: Claude <noreply@anthropic.com>1 parent b373fac commit 5d28c4e
2 files changed
Lines changed: 582 additions & 143 deletions
0 commit comments