[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unification
From: |
stefan |
Subject: |
Re: unification |
Date: |
Fri, 14 May 2010 11:15:54 +0200 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; ) |
I did a reference implementation of unification code in pure
scheme. It is just 185 lines of code (the rest is the test case)
see http://c-lambda.se/unify.scm
Some timings for the example
============================
scheme-version > 2100 ms
c-initial-guile > ~150 ms
current-best-guile > 73 ms
sbcl > 25 ms
gprolog > ~20 ms
So I've been able to tweak out 2x in guile + c
So what next?
This is what I will be playing with.
one need apart from a unification primitive also
be able to destruct a pattern into variable references
this can be done in a vm on a stack machine. And I will
now go on to let this vm be the guile vm itself. Later
on when we the compiler starts to shine, I could hook into
that as well and generate target code. So this litle play will
spill over into being useful for the compiler later.
/Stefan
- Re: unification,
stefan <=