[Gambas-user] Gambas has Gosub now!
Kevin Fishburne
kevinfishburne at ...1887...
Wed Mar 7 03:27:23 CET 2012
On 03/05/2012 09:00 PM, Benoît Minisini wrote:
> Le 06/03/2012 02:11, Emil Lenngren a écrit :
>> Yeah, if there is no stack relocation, I can assume that a lot of pointers
>> into the stack will not change during other external calls, which should
>> make code more optimized.
>>
>> Since local variables and stack frames in gambas take up more space than
>> they do in C, I think the stack should be bit bigger than the default in C
>> (compiled with gcc).
>>
>> /Emil
>>
> Stack allocation through mmap() has been implemented in revision #4536.
> Tested on my 64 bits system only.
>
> Now recursion speed is equivalent between GoSub and normal functions as
> soon as there are control variables. If there is no control variables to
> save, GoSub is about 2.5 times faster than normal functions.
>
That is awesome. Optimizations using traditional syntax are always
welcome. C-like speed achieved with BASIC functions. :)
--
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271
More information about the User
mailing list