Re: Bouncing on trampolines (so cool...)

2013-05-16 Thread Alexander Burger
On Thu, May 16, 2013 at 04:33:49PM +0200, Alexander Burger wrote: > > though the less-recursive function is slightly slower (as expected). > > Oops, forget that! Not "as expected" ... the opposite would be expected. > But the values are very close anyway. One more oops!! Though it doesn't matter

Re: Bouncing on trampolines (so cool...)

2013-05-16 Thread Alexander Burger
Hi Samuel, > (bench (length (trampoline ack/t 3 8000))) (64-bit Ersatz on Java 8, before > =0 and length invocation removal) > 9.625 sec > > (bench (length (trampoline ack/t 3 8000))) (64-bit Ersatz on Java 8, after > =0 invocation removal) > 4.981 sec > > (bench (length (trampoline ack/t 3 8000

Re: Bouncing on trampolines (so cool...)

2013-05-16 Thread Samuel Dennis Borlongan
Re: side-note (bench (length (ack4 3 8000))) (32-bit Cygwin) 0.070 sec (bench (length (trampoline ack/t 3 8000))) (32-bit Cygwin) 2.010 sec (bench (length (trampoline ack/t 3 8000))) (64-bit Ersatz on Java 8, before =0 and length invocation removal) 9.625 sec (bench (length (trampoline ack/t 3

Re: Bouncing on trampolines (so cool...)

2013-05-16 Thread Alexander Burger
On Thu, May 16, 2013 at 01:33:54PM +0200, Alexander Burger wrote: >: (bench (ack 4 1)) >249.465 sec >-> 65533 > >: (bench (ack2 4 1)) >252.487 sec >-> 65533 > > though the less-recursive function is slightly slower (as expected). Oops, forget that! Not "as expected" ... t

Re: Bouncing on trampolines (so cool...)

2013-05-16 Thread Alexander Burger
Hi all, I didn't bother with trampolines so far, but add some comments to On Thu, May 16, 2013 at 12:00:20AM +0800, Samuel Dennis Borlongan wrote: > ... > http://stackoverflow.com/questions/12186672/how-can-i-prevent-my-ackerman-function-from-overflowing-the-stack > ... The bad thing with overfl

Re: Bouncing on trampolines (so cool...)

2013-05-15 Thread Tomas Hlavaty
Hi Samuel, > (de trampoline (F . @) good idea, that looks better than having to pass the arguments as a list. > # > http://stackoverflow.com/questions/12186672/how-can-i-prevent-my-ackerman-function-from-overflowing-the-stack > > (de ack/t (M N R S) > (default R '()) > (if (> (length R) 0)