Blog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2025 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Kotlin
Kotlinmedium

What does `inline` do and when can it help performance?

Tags
#inline#performance#lambdas
Back to categoryPractice quiz

Answer

`inline` copies the function body to the call site. It can reduce overhead of higher-order functions by avoiding lambda allocations and virtual calls (but increases bytecode size).

Related questions

Kotlin
Inline lambdas and non-local returns: what are `crossinline` and `noinline` for?
#kotlin#inline#crossinline
Kotlin
`tailrec`: what does it do and when can Kotlin optimize recursion?
#kotlin#tailrec#recursion
Kotlin
Dispatchers in Kotlin coroutines: `Default` vs `IO` vs `Main`?
#kotlin#coroutines#dispatchers
Kotlin
What are reified generics and why do they require `inline`?
#reified#inline#generics
MongoDB
Text indexes: when would you use them and what’s a limitation?
#mongo#text-index#search
MongoDB
`$lookup`: what does it do and what is a common pitfall?
#mongo#lookup#aggregation