We all like to see how fast our programming languages are. Here I was interested in how some Scheme implementations compared with an equivalent C++ program (and each other).
The program is
ferret, a text comparison program which works out how similar
pairs of documents are. The C++ implementation is wrapped as a Ruby gem:
uhferret-gem. An R7RS Scheme
version and an R6RS version were created, and tested with Gauche (0.9.6),
Sagittarius (0.8.4) and Chez Scheme (9.4.1). (The scheme versions are at
The tests were against a directory of text documents, containing varying numbers of words.
Sagittarius and Gauche perform poorly as the number of words increase, and the lines show exponential tendencies. However, let’s zoom in on the bottom of the graph:
Look carefully: Chez Scheme comes below the C++ line: on these data, Chez Scheme is the fastest!
The raw numbers (times in seconds)