Getting rid of recursive AST evaluation in a custom language

I wonder how much of a constant-factor optimization could be won by eliminating the pointer-chasing: move Expr's variants to Ops, iterate over a vector of Ops and values (Paths, i64s, bools), pop an op, pop as many arguments as it needs ... this is partly opposite to advice I gave before, but maybe it would speed up your program.

1 Like