Has anybody measured the performance impact of usi...
# announcements
m
Has anybody measured the performance impact of using
Result
-style classes? (and
sealed
vs.
inline
for distinguishing cases). I imagine plenty of object allocations.
b
Hi Marc, I haven't done any measurement this kind. But I read often that short lived objects do not lead to problems with modern GCs. So if you create an object and throw it away very few cycles later, this should NOT lead to bad performance.
m
Thanks Dieter, that’s what I hope đŸ™‚
j
I would say that escape analysis with Kotlin functions is less than perfect, there are a number of low-hanging fruits in the jvm that make sense to be quickly reclaimed by escape analysis but prove not to be so until you promote a function to a loop or branch statement.
one of the curious things unlike java language is that all functions are created as an static class instead of class in the same scope.