altavir
04/28/2021, 7:24 AMUsing inline function everywhere does not improve performance, but on the contrary, decreases it because JVM inlining is better than manual inlining. Also, using inline everywhere significantly bloats the bytecode because it creates a copy of the code for each call. So please, PLEASE, do not recommend using inlines for optimizations. And it definitely should not be ever used in large functions. Performance optimizations like that should not ever be used without need and without profiler measurements.In general inlines should not be used for optimizations without profiler measurements. My own measurements show that inlining large functions significantly decreases performance. So beginniers should stick to the functions in the standard library, which are already optimized by size and usage. Without additional considerations inline should be used only for reifications and non-local returns.
Ksenia Shneyveys
04/28/2021, 2:23 PMFlorina
04/28/2021, 3:43 PMaltavir
04/28/2021, 3:49 PMaltavir
04/28/2021, 3:50 PM