I have been using chicken scheme lately and i find it really good, someone suggested that chez scheme is the fastest scheme implementation. So i wanted to try it, but i am not sure how to create compiled binaries from chez like in chicken scheme.
As Sylwester has already mentioned the fasl binaries, but this solution still requires to distribute a chez scheme interpreter. A more interesting solution which produces distributable binary is chez-exe https://github.com/gwatt/chez-exe
Chez has a JIT and you can compile files into fasl-like files that you can run just like source files.
From Using Chez Scheme:
Chez Scheme compiles source forms as it sees them to machine code before evaluating them, i.e., "just in time." In order to speed loading of a large file or group of files, each file can be compiled ahead of time via compile-file, which puts the compiled code into a separate object file. For example, (compile-file "path") compiles the forms in the file path.ss and places the resulting object code in the file path.so. Loading a pre-compiled file is essentially no different from loading the source file, except that loading is faster since compilation has already been done.
When compiling a file or set of files, it is often more convenient to use a shell command than to enter Chez Scheme interactively to perform the compilation. This is easily accomplished by "piping" in the command to compile the file as shown below.
echo '(compile-file "filename")' | scheme -q
© 2022 - 2024 — McMap. All rights reserved.