How to Make Racket Go (Almost) As Fast As C | Lambda Land
A basic interpreter works by walking down the AST and evaluating nodes recursively: when the interpreter encounters an expression, it dispatches on the type of expression to decide how to perform the evaluation. Here’s the key insight to get a massive speed bump with very little effort: that dispatch is expensive and can be performed ahead-of-time. We can walk through the code once and precompute all the dispatching work.
This is not a new idea. The first description that I’m aware of comes from Feeley and Lapalme [1]. A name for this technique is making a threaded interpreter. It’s nowhere near as fast as a native code compiler, but interpreters are easy to write, and this is a very simple way to get a very big boost in performance.
Using closures for code generation - ScienceDirect
Using closures for code generation
Abstract
'Programming' 카테고리의 다른 글
Mojo vs Julia: Comparison of Two Powerful Languages (codeavail.com) (0) | 2024.10.07 |
---|---|
Rust 언어의 단점 (0) | 2024.06.13 |
CodeConvert 소개 (0) | 2024.04.20 |
Python to Julia Converter (codeconvert.ai) (0) | 2024.01.30 |
(Julia) Zero-based indexing ... (not) again (0) | 2024.01.29 |