Astbench()
FUNCTION: astbench(<expression>, <iterations>)
Wizard-only benchmarking tool that compares the AST interpreter and the JIT compiler. The expression is parsed once, then run through both engines for <iterations> loops (clamped to 100000). The function returns a formatted string such as:
ast=0.12us jit=0.03us ratio=4.0x result=42
Use this when investigating parser/JIT parity or validating recent optimizations.
Related Topics: jitstats(), rvbench().