aspose file tools*
The moose likes Performance and the fly likes Which one is better Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Which one is better" Watch "Which one is better" New topic
Author

Which one is better

Vijay Kumar
Ranch Hand

Joined: Jul 24, 2003
Posts: 260
hi,

We have arraylist & LinkList which one is better in performance

thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
I will never understand why people ask these bizarre open-ended questions :roll:

Performance at doing what task?

As an exercise for the student - your task is to go study the JavaDocs for these two classes. Look at the functionality in each one and decide for yourself which class is suitable for your particular problem. If both will handle your job, examine the API (and if necessary, the source code) to determine which class does more work to accomplish its functions.

That is homework to be handed in next week.

Bill
Vijay Kumar
Ranch Hand

Joined: Jul 24, 2003
Posts: 260

I will never understand why people ask these bizarre open-ended questions


Thanks
Bill
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
Both are well suited for certain tasks so there is no 'better' or 'worse'. I googled and came up with the following that lists pros and cons of the various collections including the ones you mentioned. Here it is:

http://java.sun.com/docs/books/tutorial/collections/implementations/list.html
[ January 18, 2007: Message edited by: steve souza ]

http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which one is better