groostav
06/19/2020, 9:17 PMx1 + x2 - max(thirdVar, fourthVar) * cos(y6)
). Thus I got to write a little compiler and I did it on top of antlr. I recently converted it to generate a little stack assembly language (implemented with a sealed class, eg (sealed class ASM()
, data class PushI(val int: Int): ASM()
, object Multiply: ASM()
, data class InvokeBinary(val name: String)
), expecting that to be fast as hell. its not. Its actually slower than when I just did a tree evaluation. I'm going to stripe the sealed classes such that they use enums, in hopes that makes things run faster. I want to be able to evaluate these expressions at the rate of ~100,000 per sec. Any idea how i might get there? this is https://github.com/EmpowerOperations/babel\groostav
06/19/2020, 9:20 PMNikky
06/20/2020, 12:25 AMgroostav
07/08/2020, 9:38 PM