3 ms·
I'm using similar technique in the Scheme implementation Gauche. Gauche compiles Scheme into VM instrunctions, but VM itself, some foreign bridges, and perform
by shiro 18y ago
I'm using similar technique in the Scheme implementation Gauche. Gauche compiles Scheme into VM instrunctions, but VM itself, some foreign bridges, and performance-critical pieces are in C. I started from plain C, then gradually moved to C-in-S-expression. Here's my experience:
* As others pointed, ability to use powerful macros are huge relief compared to the crude macro of C.
* I can manipulate a piece of C code (in S-expr) programmatically. For example, I can automate VM instruction fusion (create a piece of code that combines two or more basic VM instructions).
* I can mix Scheme code and C code more naturally, allowing me to micro-tune inner loop and/or reducing overhead of FFI.
Of course, if you have really good native Lisp compiler on your target platform, you won't need this kind of stuff.