huh, performance is annoying: ``` override fu...
# announcements
g
huh, performance is annoying:
Copy code
override fun exitLiteral(ctx: BabelParser.LiteralContext) = instructions.build {

        val value = ctx.value

        append {
            stack.push(value)
        }
    }
runs twice as fast as
Copy code
override fun exitLiteral(ctx: BabelParser.LiteralContext) = instructions.build {
        append {
            stack.push(ctx.value)
        }
    }
because the latter has a closure that references a
LiteralContext
, resulting in a huge amount of superfluous ANTLR runtime data hanging around after compilation. I wonder if I can write some kind of automated test to catch this....