Hello,

on a simple task - multiply two matrices mat_a and mat_b https://github.com/glathoud/flatorize/blob/master/explore/scheme_matmul_common.scm - I've been comparing 3 implementations, using interpretation and compilation.

To compile I used the line below. Is there a better way, at least a few straightforward optimization (options) ?
gsc -exe -o scheme_matmul_classic.bin tmp.scm
Details are below.

Best regards,
Guillaume


1. Functional implementation:
https://github.com/glathoud/flatorize/blob/master/explore/scheme_matmul_list_of_lists.scm#L50

2. Ugly imperative implementation:
https://github.com/glathoud/flatorize/blob/master/explore/scheme_matmul_classic.scm#L33

3. Flat implementation (for the specific matrix sizes):
https://github.com/glathoud/flatorize/blob/master/explore/scheme_matmul342.scm#L31


To run both tests (interpreted and compiled), I used this:
https://github.com/glathoud/flatorize/blob/master/explore/scheme_matmul.sh#L16

Results:
https://github.com/glathoud/flatorize/blob/master/explore/scheme_matmul.results.txt