AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Languages, Compilers and Interpreters C,C++,C#,.NET,Java,PHP,Perl,SQL and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Aug 21, 2004, 14:41   #1
The Reloaded
 
Aram Hambardzumyan's Avatar
 
Join Date: Jan 2002
Location: behind the flesh and gelatinе of soft dull eyes
Posts: 3,178
Rep Power: 7
Reputation: 45
Tail recursion

Tail recursion is when no instruction follows recursive call and calling function returns immediately after it:

int foo(int x)
{
//.............

return foo(x-1);
}

Did you know that there exist stack optimisation opportunities in this case? So if compiler supports it then tail recursion is as 'bad' as iteration
Aram Hambardzumyan is offline   Reply With Quote Quote selected
Old Aug 21, 2004, 18:14   #2
Магистр
 
svoy's Avatar
 
Join Date: Nov 2003
Location: heart of europe
Posts: 704
Rep Power: 5
Reputation: 10
Send a message via ICQ to svoy Send a message via AIM to svoy Send a message via MSN to svoy Send a message via Yahoo to svoy Send a message via Skype™ to svoy
for example JVM(java virtual machine)????
__________________

If you stop, you die! Doc Miles, Crank
svoy is offline   Reply With Quote Quote selected
Old Aug 22, 2004, 06:48   #3
The Reloaded
 
Aram Hambardzumyan's Avatar
 
Join Date: Jan 2002
Location: behind the flesh and gelatinе of soft dull eyes
Posts: 3,178
Rep Power: 7
Reputation: 45
maybe, i don't know
Aram Hambardzumyan is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:57.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link