[fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread Bihar Anwar
After my previous post, TreeView and Nonrecursion, I'd tried to ask the same topics in stackoverflow.com (http://stackoverflow.com/questions/3630047/treeview-control-and-nonrecursion) and I got something new. It is possible to recurse without using up the stack space. Optimizing compilers

Re: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread José Mejuto
Hello FPC-Pascal, Friday, September 3, 2010, 1:12:31 PM, you wrote: BA After my previous post, TreeView and Nonrecursion, I'd tried to ask the same BA topics in stackoverflow.com BA (http://stackoverflow.com/questions/3630047/treeview-control-and-nonrecursion) BA and I got something new. BA

[fpc-pascal] Thread problem

2010-09-03 Thread andrey
Dear community, I'm trying to write console program using thread but have several problems. I have already posted them to Lazarus forum: 1) http://forum.lazarus.freepascal.org/index.php/topic,10403.0.html - Threads not working 2)

Re: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread Bihar Anwar
September 3, 2010 7:17:57 PM, José Mejuto wrote: That kind of optimization to me only seems interesting in two possible situations, when calling functions is high costly or when there is a very limited stack amount (really, really small). From my point of view if you need more that 1MB of

Re[2]: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread José Mejuto
Hello FPC-Pascal, Friday, September 3, 2010, 3:06:30 PM, you wrote: BA First, just curious, have somebody here ever benchmark performance between BA native stack and regular RAM as a stack? Stack is RAM, so the only difference is in the algorithm used. -- Best regards, José

Re: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread Marco van de Voort
Second, does FPC understand tail recursion? Depends on version, do fpc -i |grep -i tailrec to find out more. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread Bihar Anwar
O Marco, I love you :-) - Original Message From: Marco van de Voort mar...@stack.nl To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org Sent: Fri, September 3, 2010 11:02:52 PM Subject: Re: [fpc-pascal] Recursion optimization by compiler Second, does FPC understand tail

Re: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread Marco van de Voort
In our previous episode, Bihar Anwar said: O Marco, I love you :-) Better love Florian :-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread Sven Barth
On 03.09.2010 18:02, Marco van de Voort wrote: Second, does FPC understand tail recursion? Depends on version, do fpc -i |grep -i tailrec to find out more. O.o Ok... now I'm officially impressed. Maybe it's time to reuse some of my OCaml knowledge from the 3rd term of my study :D