Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-03-2007, 01:50 PM
Senior Member
 
Join Date: Nov 2007
Posts: 115
ravian is on a distinguished road
recursion
I have a task in hand and there are two options.

Option 1 : Do this task in a simple way
Option 2: Write a method and call in recursively.

Both are producing the required results. My question is, does recursion causes performance issues?

Please advice.

Thanks.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-03-2007, 05:13 PM
ShoeNinja's Avatar
Senior Member
 
Join Date: Oct 2007
Posts: 123
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
I always thought that recursion does take up a little bit more memory because it has to keep track of all the pointers. Other than that, I would think that it has the same performance.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-03-2007, 07:15 PM
Senior Member
 
Join Date: Nov 2007
Posts: 115
ravian is on a distinguished road
So the bottom line is, recursion takes more memory.
Thanks.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help With Recursion andrew777 New To Java 1 03-29-2008 02:51 PM
recursion kdeighan New To Java 3 01-25-2008 11:48 PM
Recursion bozovilla Advanced Java 3 01-07-2008 06:53 PM
Help with recursion scts102 New To Java 1 11-20-2007 12:07 AM
Recursion in java lenny Advanced Java 1 08-07-2007 08:23 AM


All times are GMT +3. The time now is 04:35 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org