Re:Which Interpreters Are Faster, AST or Bytecode?
by rightbyte on Friday October 20, 2023 @10:43AM
(#37956802)
Ye well my head went spinning reading that. Does such a "compiler factory" exist?
[ Parent
| on HN ]
Re:Which Interpreters Are Faster, AST or Bytecode?
by duped on Friday October 20, 2023 @12:06PM
(#37957990)
Yes, this is what Truffle is all about (1). You use Truffle to write the AST interpreter for your language and then GraalVM uses it to compile a JIT compiler for you automatically, with the bonus of interop with other languages.
(1) https://www.graalvm.org/latest/graalvm-as-a-platform/languag...
Re:Which Interpreters Are Faster, AST or Bytecode?
by mikmoila on Friday October 20, 2023 @02:17PM
(#37959607)
Wasn't it so that as Graal jitter is written in Java, Truffle can easily call it by using ordinary Java api?
By the way there's an excellent series of articles about implementing an interpreter with Truffle by Adam Ruka: https://www.endoflineblog.com/graal-truffle-tutorial-part-12...