https://kotlinlang.org logo
#random
Title
# random
g

Gavin Ray

02/11/2022, 7:36 PM
Quick question: I notice that changing
jvmTarget
from
1.8
to
17
, and setting the below compiler arguments seems to make a near-zero impact on performance. Does anyone have experience or suggestions on changes that DO make improvements?
Copy code
freeCompilerArgs = freeCompilerArgs + listOf(
    "-Xlambdas=indy",
    "-Xsam-conversions=indy",
    "-Xstring-concat=indy-with-constants",
    "-Xtype-enhancement-improvements-strict-mode",
    "-Xinline-classes",
    "-Xnew-inference",
    "-Xunrestricted-builder-inference",
    "-Xuse-fir",
    "-Xuse-fir-extended-checkers"
)
e

ephemient

02/11/2022, 8:01 PM
-Xinline-classes
,
-Xnew-inference
are already default. everything aside from indy affects compile time but not runtime. indy lambdas reduce classes but generates classes during bootstrap so that's no different. the runtime difference of indy lambdas is insignificant. the runtime difference of indy string concat is not necessarily positive. https://youtrack.jetbrains.com/issue/KT-50142
you'll get more mileage out of tuning GC and maybe hotspot parameters than compile parameters
g

Gavin Ray

02/11/2022, 8:24 PM
Ahh that is really useful information, appreciate it -- thank you! 🙏
f

Fleshgrinder

02/12/2022, 8:16 AM
string-concat=indy-with-constants
is also default with JVM target 9+
🙏 1
4 Views