hmm, so I'm doing a little bit of performance sens...
# announcements
g
hmm, so I'm doing a little bit of performance sensitive compiler-ee things for a DSL, I'm wondering what the extra GC churn of
Copy code
typealias UnaryOp = (Double) -> Double
object cos: UnaryOp by Math::cos
is compared to
Copy code
object cos: ((Double) -> Double) {
  override fun invoke(arg: Double) = Math.cos(arg)
}
any ideas? is this a compiler optimization or will
UnaryOp by Math::cos
create a closure and have
cos.invoke(arg)
call
$delegateClosure.invoke(arg)