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.
2 Answers
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

- 5,818
- 3
- 43
- 55

- 1,562
- 19
- 30
-
Any benefit in terms of executable size and speed when comparing with Chicken? – antonio Feb 17 '18 at 23:55
-
@antonio Yes Chez scheme is actually faster than Chicken. Though I absolutely love chicken, I have heard a lot about chez which is why I wanted to give it a full inspection before making a final opinion. – pankajdoharey Feb 23 '18 at 04:37
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

- 47,942
- 4
- 47
- 79
-
3Thanks, but i was looking for a compiled single binary which does not require a chez-scheme interpreter. Found an interesting solution https://github.com/gwatt/chez-exe check it out. – pankajdoharey Jan 02 '18 at 16:07