Comment by 14113
3 hours ago
It required a little bit of messing with optimisation settings and library generation in Rust, but they emit very very similar x86-64 assembly:
3 hours ago
It required a little bit of messing with optimisation settings and library generation in Rust, but they emit very very similar x86-64 assembly:
Nice, thank you for picking up after my laziness. Surely only a few bytes different in the binary, and much, much smaller of a delta than the source.
You can further reduce the difference by passing Expr by pointer in the C version. At that point I think the only difference in the assembly is the order in which the cases are handed.