Reflekt: a Library for Compile-Time Reflection in Kotlin
Anastasiia Birillo, Elena Lyulina, Maria Malysheva, Vladislav Tankov,, Timofey Bryksin

TL;DR
Reflekt is a compile-time reflection library for Kotlin that improves performance over traditional run-time reflection, enabling faster startup times for serverless applications and reducing cloud infrastructure costs.
Contribution
It introduces a compile-time reflection library with a DSL for Kotlin, offering better performance than existing run-time approaches.
Findings
Significant startup time improvement in Kotless applications
Reflekt outperforms run-time reflection in speed
Enhanced performance reduces cloud costs
Abstract
Reflection in Kotlin is a powerful mechanism to introspect program behavior during its execution at run-time. However, among the variety of practical tasks involving reflection, there are scenarios when the poor performance of run-time approaches becomes a significant disadvantage. This problem manifests itself in Kotless, a popular framework for developing serverless applications, because the faster the applications launch, the less their cloud infrastructure costs. In this paper, we present Reflekt - a compile-time reflection library which allows to perform the search among classes, object expressions (which in Kotlin are implemented as singleton classes), and functions in Kotlin code based on the given search query. It comes with a convenient DSL and better performance comparing to the existing run-time reflection approaches. Our experiments show that replacing run-time reflection…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
