Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters
Register

Reply
 
LinkBack Thread Tools
Old 21.08.2004, 15:41   #1
The Reloaded
 
Aram Hambardzumyan's Avatar
 
Join Date: 01 2002
Location: behind the flesh and gelatinе of soft dull eyes
Posts: 3,387
Downloads: 4
Uploads: 0
Reputation: 146 | 4
Default 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
Reply With Quote
Old 21.08.2004, 19:14   #2
Магистр
 
svoy's Avatar
 
Join Date: 11 2003
Location: heart of europe
Age: 38
Posts: 718
Downloads: 41
Uploads: 0
Reputation: 11 | 3
Default

for example JVM(java virtual machine)????
Reply With Quote
Old 22.08.2004, 07:48   #3
The Reloaded
 
Aram Hambardzumyan's Avatar
 
Join Date: 01 2002
Location: behind the flesh and gelatinе of soft dull eyes
Posts: 3,387
Downloads: 4
Uploads: 0
Reputation: 146 | 4
Default

maybe, i don't know
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 15:38.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.