Monday, October 14, 2013

Scheme as embeddable language for C

Tried guile 2.0.9, tinyScheme, chibi-scheme and lua 5.2.

On MacOSX 10.8.5 memory footprint of default interpreter is:

guile 12.4 MB,
tinyScheme 984 KB,
chibi-scheme 2.7 MB,
lua 760 KB.

Executing 'hello world' with 'time' takes:

time guile -c '(display "hello, world!\n")' --- real 0m0.027s
time ./scheme -c '(display "hello, world!\n")' --- real 0m0.007s
time ./chibi-scheme -e '(display "hello, world!\n")' --- real 0m0.046s
 time lua -e 'print("hello, world!\n")' --- real 0m0.004s

 To sum up, for config files tiny-scheme or lua are perfect. Taking into account that lua is a full-featured language while tiny-scheme is a shrinked down one, lua is a clear winner.