Re: [q-lang-users] Pure
Brought to you by:
agraef
From: Libor S. <li...@gm...> - 2008-04-28 09:45:26
|
Albert, It is great to hear about your progress! I suspect the answer to beating even more languages lies in making your matcher as fast as possible, so that it can approach the speed of a fixed function call that most other languages use. You probably know a lot more about this but if I was implementing Pure I would start by converting all operators/functors/constructors to the same internal representation, such as *(X,Y) instead of X*Y and then have a very efficient indexing scheme (hashing?) for locating the LHS of the next equation to invoke. In this example, I know I only need to look for functor "*" with two arguments. I have installed Ubuntu 4.08, which was, unexpectedly, a pain in the neck. It comes with an old version of LLVM available and that installed easily. Next I will have a go at a manual installation of LLVM 2.2. Regards, Libor On Sun, 27 Apr 2008 04:22:22 +0100, Albert Graef <Dr....@t-...> wrote: > Hi friends, > > well, it was quite a bit more work than I expected, but it finally > works! :) And I already have the Pure->C interface, exceptions > (catch/throw) and a considerable part of the system module working > (basic I/O, printf/scanf, glob, regex). Nicely enough, I can write most > of the wrappers in Pure now. > > BTW, the present version is some 30-40 times faster than Q on naive fib, > IIRC. I was hoping for more, but it's already 7 times faster than Python > 2.4 on the recursive benchmark from the shootout, and it certainly makes > Hugs look very bad; MZ Scheme is still a bit faster, though. So I guess > it's fast enough -- and there's no doubt that the generated code can > still be improved. ;-) > > Still working on a few examples, too tired to do a prerelease tonight. > Maybe tomorrow. For the time being, get LLVM 2.2 up and running on your > machines, you'll need it. ;-) > > Cheers, > Albert |