More specifically, you can compile syntax (of your choosing) into performant, low-level Lisp code, which the Lisp compiler can then compile into efficient machine code. To do this, you need no extra tools, no intermediate files, no compiler hooks, no virtual machines, no byte codes, and no non-standard or non-portable features. It has been built in to Lisp since at least the 1980s.
Making miniature "JIT" compilers is also a technique a quantum simulator in Lisp [0a, 0b] uses to optimize quantum gate operations. It analyzes the quantum gate matrix and, on the fly, compiles it into optimized numerical Lisp code that is equivalent to that matrix acting on vectors of tensor product spaces (i.e., super huge arrays of complex double floats). Using another language would require me to do arduous things like write assembly code or learn a library like LibJIT [1] which may not even interface well with my host language.
Other simulators out there written in C use huge hand-unrolled loops with comments like
// THIS CODE WAS GENERATED, DO NOT TOUCH
and/or in-line assembly code, and still can't optimize specific matrix shapes and structures, or do algebraic simplifications to eliminate work altogether.The regex library FTA is a great, and clean, example of a long standing practice of compiling regexen, except it doesn't use any fancy VMs or any fancy JITs, just "when you see this regex, automatically turn it into this Common Lisp code, and let the Lisp compiler handle the rest."
[0a] https://github.com/quil-lang/qvm
[0b] COMPILE-OPERATOR: https://github.com/quil-lang/qvm/blob/master/src/compile-gat...