Results 1 to 3 of 3
  1. #1
    OptimusPrime is offline Member
    Join Date
    Dec 2009
    Posts
    14
    Rep Power
    0

    Default optimization mechanism to improve tail-recursion running time?

    hey,
    ive been reading alot about this subject and still no good mechanism was found, what do u think will improve the run-time performance of a tail recursion?
    maybe creating a command that will turn a tail-recursion to a while loop?
    whats your opinion?
    thanks

  2. #2
    AndreB's Avatar
    AndreB is offline Senior Member
    Join Date
    Dec 2009
    Location
    Stuttgart, Germany
    Posts
    114
    Rep Power
    0

    Default

    use haskell, lisp or scheme if you are really into recursion... not java :-)
    why do you want to optimize recursion? it is "easy" to understand and implement and sometimes it will be faster then the iterative variant (wiki). And there are some examples that are very comlicated to formulate with iterative method not using a stack (see "See Also" examples from the wiki article) .
    "There is no foolproof thing; fools are too smart."
    "Why can't you solve my Problem ?"

  3. #3
    OptimusPrime is offline Member
    Join Date
    Dec 2009
    Posts
    14
    Rep Power
    0

Similar Threads

  1. recursion and tail-recursion differences
    By OptimusPrime in forum New To Java
    Replies: 2
    Last Post: 12-28-2009, 06:26 PM
  2. Running thread a second time
    By Fleur in forum New To Java
    Replies: 18
    Last Post: 11-17-2009, 12:57 PM
  3. Improve the slow running time
    By coolFrenzi in forum Advanced Java
    Replies: 1
    Last Post: 04-12-2009, 12:15 PM
  4. Replies: 7
    Last Post: 12-16-2008, 06:44 PM
  5. Replies: 25
    Last Post: 06-28-2008, 05:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •