I have both 4.4 personal and 5.01 personal installed on my machine to
test some things out. From a fresh image and doing the simple
factorial:
(defun fac (n)
(if (zerop n) 1 (* n (fac (1- n)))))
Running (fac 100) in 4.4 yields the proper result while doing the same
in 5.0 results in a stack overflow. Was there a change in 5.0 that did
this or was there a fundamental change with how the personal edition
was being presented that caused this? Obviously, increasing the stack
size fixes the problem.
Slightly related note: the default stack size is 16,000 in 5.0, and I
can't think of any reason why (fac 100) should blow that limit - even
with that single extra parameter. How big is the stack frame for a
function with no local data?
Jeff M.
On 19 Apr 2007 12:41:45 -0700, "Jeff M." <·······@gmail.com> wrote:
> I have both 4.4 personal and 5.01 personal installed on my machine
> to test some things out. From a fresh image and doing the simple
> factorial:
>
> (defun fac (n)
> (if (zerop n) 1 (* n (fac (1- n)))))
>
> Running (fac 100) in 4.4 yields the proper result while doing the
> same in 5.0 results in a stack overflow.
Why don't you just compile the function?
--
Lisp is not dead, it just smells funny.
Real email: (replace (subseq ·········@agharta.de" 5) "edi")
Edi Weitz <········@agharta.de> writes:
> Why don't you just compile the function?
The 5.0 interpreter is actually significantly slower than the 4.4
interpreter (because of more debugging possibilities, maybe?).
I consider the slowness to be a bonus feature - if you forget to compile a
module, you'll be reminded :-)
--
(espen)
(message (Hello 'Jeff)
(you :wrote :on '(19 Apr 2007 12:41:45 -0700))
(
JM> Running (fac 100) in 4.4 yields the proper result while doing the same
JM> in 5.0 results in a stack overflow. Was there a change in 5.0 that did
JM> this or was there a fundamental change
unless you compile function with right flags, it's in 'interpreted mode',
that can be called also 'debug mode' --
JM> How big is the stack frame for a function with no local data?
in debug mode it contains all information that debugger think is necessary,
that can be arbitrarily long..
)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"I am everything you want and I am everything you need")