[Ecls-list] How to optimize compiler's output?

mokehehe at gmail.com mokehehe at gmail.com
Thu Mar 6 22:41:50 UTC 2008

Hello, I read new manual,

| 4.4. Use of Declarations to Improve Efficiency
| http://ecls.sourceforge.net/new-manual/ch23s04.html

I tried it, but it lack right paren? I put it after 'proclaim'.

> (eval-when (compile)
>   (proclaim '(function tak (fixnum fixnum fixnum) fixnum)))
> (defun tak (x y z)
>   (declare (fixnum x y z))
>   (if (not (< y x))
>       z
>     (tak (tak (1- x) y z)
>          (tak (1- y) z x)
>          (tak (1- z) x y))))

I compile it, but I couldn't get optimized output.
When I compile this source file, warning message is appeared:

| > (compile-file "tak.l" :system-p t :c-file "tak.c")
| ;;; Compiling tak.l.;;; Warning: The variable name (FIXNUM FIXNUM
FIXNUM) is not a symbol.

How do I proclaim function's argument and return value type, and
optimized compiler's output?

I use ecl-0.9j, and compile on msvc, Windows XP.


More information about the ecl-devel mailing list