Hi,

I wanted to chime in with some notes about performance for guile-log and
kanren on guile-log.

For the einstein case,
The story is that I compiled the c-code with -O3 and added faster versions
with reduced call overhead for functions
loaded from c under by using 5 extra vm instructions.

Guile-log went down to about 50ms for the stack version and 200 for the
assoq version. Kanren ontop guile-log with the
stack version was about the same e.g. 200ms

I then really wanted to see the performance assuming that you profile and
code the hotspots in C. Doing this
I could bring down the test to 25ms for stack based and 125ms for the assoq
version. I know that compiled prolog
performs about 12-14ms and about 50% of guile-log is in the overhead of the
VM and the cost of constructing
closures.

Coding the algorithms in C is pretty awkward and you typeically cannot do
that straightforwardly. The reason is that
one need to handle tail calls and closures in c-land as well. I do have a
framework to make such C-code. But then
the guile-log version on C is isolated from Scheme. It would be really cool
to make them interoperate.

Anyhow
Have fun

Stefan

Reply via email to