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

altavir

07/29/2020, 10:05 AM
@Iaroslav Postovalov just published an article about AST-based optimization of mathematic expressions in Kmath: https://medium.com/@postovalovya/expression-optimization-with-jvm-bytecode-generation-b50304b96619. It is a little bit technical, bur I think it worth reading for people who are interested in performance on JVM.
❤️ 2
m

mikehearn

07/29/2020, 2:46 PM
@Iaroslav Postovalov Did you look at
invokedynamic
at all? It allows for doing things like specialising call sites or call targets to avoid boxing
i

Iaroslav Postovalov

07/29/2020, 3:16 PM
Yes, it is a great idea. However, currently, I do not quite understand how to create an object that has context-dependent behavior, or make bridge method return not an object (without using Java 11 on which I don't need any bridges)
And, of course, I know about invokedynamic and lambda metafactory
And I'll check if I can use
altMetafactory
to implement behavior you were about.
2 Views