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

compiling functions

In an application I have a vector of lambda expressions which I use to 
dispatch the correct routine to execute on given data. Now I want to
compile this dispatch table. In CL I would just call

>>>> (compile nil (lambda ....))

which returns me the compiled version of the lambda expression. This of
course works also in AKCL, but is painfully slow, since cc is called for
all these functions separately:

>>>> (compile nil (aref *r* 0))
>>>> Compiling gazonk0.lsp.
>>>> End of Pass 1.  
>>>> End of Pass 2.  
>>>> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
>>>> Finished compiling gazonk0.lsp.
>>>> Loading gazonk0.o
>>>> start address -T 2705f4 Finished loading gazonk0.o
>>>> #<compiled-function compiler::cmp-anon>

To speed things up, I was trying to stuff all these anonymous functions in
a single file, but here is where I am getting confused>.

Of course, just putting them all into the file won't do, since I must use
load to get the compiled stuff back in. So I tried to wrap a vector around

>>>> #n( lambda1 lambda2 .... lambdan)

But now the lambdas are not compiled. I could, of course, give phone names
to all the lambdas in the file, but that seems to messy, plus extra stuff
to take care of, etc.

Is there a simple way to accomplish this?

Thanks for any hints.

Cheers, and merry christmas,


Note: The address below is valid until Jan 15, 1993.

| Thomas Weigert                 |                                 |
| Machine Inference Section      |                                 |
| Electrotechnical Laboratory    |                                 |
| Umezono 1-1-4, Tukuba-shi      | weigert@{mcs.anl.gov,etl.go.jp} |
| Ibaraki 305, Japan             | +81-298-58-5918 (phone+fax)     |