vbsteven
03/20/2023, 6:01 PMpublic inline fun Boolean.asGBoolean(): Int = if (this) 1 else 0
hfhbd
03/20/2023, 6:02 PMvbsteven
03/20/2023, 6:03 PMhfhbd
03/20/2023, 6:16 PMvbsteven
03/20/2023, 6:16 PMhfhbd
03/20/2023, 6:17 PMLandry Norris
03/20/2023, 6:26 PMCLOVIS
03/20/2023, 7:30 PMLandry Norris
03/20/2023, 7:31 PMephemient
03/20/2023, 7:33 PMCLOVIS
03/20/2023, 7:33 PMLandry Norris
03/20/2023, 7:34 PMephemient
03/20/2023, 7:35 PMinline
is a terrible way to express the intention of "cheap function". it increases your compile time by inflating the intermediate IR, and excessive inlining leads to code bloat which causes worse performance due to icache misses. best leave it to the compiler or PGO to determine what makes sense to inline.Landry Norris
03/20/2023, 7:38 PMephemient
03/20/2023, 7:39 PMLandry Norris
03/20/2023, 7:40 PMvbsteven
03/20/2023, 7:40 PMephemient
03/20/2023, 7:42 PMinline fun
which becomes part of your ABI (unless you really want it to be)Landry Norris
03/20/2023, 7:42 PMvbsteven
03/20/2023, 7:42 PM