GitHunt
UD

udalov/kotlin-reflect-benchmark-experiments

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

Languages

Kotlin100.0%

Contributors

Created February 5, 2025
Updated July 16, 2025
udalov/kotlin-reflect-benchmark-experiments | GitHunt