https://kotlinlang.org logo
#feed
Title
# feed
k

Katarzyna

08/30/2021, 8:00 AM
How inline functions work and why they can be so important for the performance of our application 🤔 Use inline modifier for functions with parameters of functional types by @marcinmoskala 👇 https://kt.academy/article/ek-inline-functions
👍🏻 1
👍 2
k

Klitos Kyriacou

08/31/2021, 2:01 PM
Very good article. One thing I noticed was that it said that if the function is not inlined, arguments of functional type (i.e. lambdas) will have to be converted by the compiler into an instance of an anonymous class. I wonder how that statement is affected by the new feature of using invokedynamic for lambdas.
m

marcinmoskala

09/02/2021, 8:19 AM
Yes, I hope to investigate that in the future, but seems it is early for writing about it. AFAIK this feature is still experimental and not used by default. Also is will still produce a class, just a lighter one. https://kotlinlang.org/docs/whatsnew15.html#lambdas-via-invokedynamic
👍 1
3 Views