kotlin-reflect-benchmark-experiments

This is a simple benchmark comparing a few different possible kotlin-reflect implementations:

  • DESCRIPTORS – the current implementation which uses K1 descriptors
  • DESCRIPTORS_WITH_METADATA – create a descriptor, but then extract protobuf, create a KmClass from it and use its properties
  • METADATA – create KmClass directly from @kotlin.Metadata
  • RAW_PROTOBUF – read @kotlin.Metadata, and then manually extract the needed data from the protobuf

This benchmark depends on a locally built kotlin-reflect from this branch: https://github.com/JetBrains/kotlin/tree/udalov-reflect (Run ./gradlew dist install)

Run benchmark via:

./gradlew cleanJmh jmh