[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Continuing experiences with guile log optimisations

From: Stefan Israelsson Tampe
Subject: Continuing experiences with guile log optimisations
Date: Mon, 30 Apr 2012 16:00:46 +0200


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

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.

Have fun


reply via email to

[Prev in Thread] Current Thread [Next in Thread]