trueagi-io / hyperon-experimental

MeTTa programming language implementation
https://metta-lang.dev
MIT License
153 stars 50 forks source link

Minimal MeTTa interpreter written mostly in Rust #728

Closed vsbogd closed 4 months ago

vsbogd commented 4 months ago

"old_interpreter" feature is added to switch back to the Rust interpreter if needed. New metta operation is added into minimal interpreter in order to call Rust MeTTa interpreter implementation. Rust interpreter is fixed to consume metta operation passed. Interpreter unit tests are fixed to be compatible with minimal MeTTa interpreter. Legacy common/arithmetics.rs modules is removed. Old MeTTa interpreter written in MeTTa is removed.

luketpeterson commented 4 months ago

This speedup is huge! 50x in some of the interpreter benchmarks. I'll work on the line-by-line review, but I am very happy with the performance boost.

Update

Not only is the new interpreter much faster, but the scaling properties are better for recursion. The old interpreter(s) paid quadratic cost, this one is almost linear.