Timeline for Performance and Memory allocation comparison between List and Set
Current License: CC BY-SA 3.0
19 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 24, 2019 at 19:18 | answer | added | Manoj | timeline score: 4 | |
| Feb 8, 2018 at 19:08 | history | edited | Cœur | CC BY-SA 3.0 |
spelling in title
|
| Feb 4, 2017 at 5:39 | comment | added | jsingh | Finding an element by value in a HashSet is O(1). In an ArrayList, it's O(n). and HashSet consumes about 5.5 times more memory than ArrayList<br> So which better to use in inverted index. | |
| Apr 24, 2016 at 18:12 | answer | added | Dave_cz | timeline score: 1 | |
| May 10, 2013 at 11:57 | comment | added | Satya | If you want to use List/Set instead of Array.. So in this can case you should go for List instead of Set, because Array can have duplicates. but set cant have duplicates. So you may loose some duplicate data. | |
| Jul 4, 2012 at 9:42 | vote | accept | Priyank Doshi | ||
| May 29, 2012 at 13:00 | history | edited | Priyank Doshi | CC BY-SA 3.0 |
added 1 characters in body
|
| May 29, 2012 at 12:58 | answer | added | Marko Topolnik | timeline score: 5 | |
| May 29, 2012 at 12:57 | answer | added | Louis Wasserman | timeline score: 124 | |
| May 29, 2012 at 12:55 | comment | added | Priyank Doshi | I may use a iterator. But there is no need for remaining insertion order. So even in this case, using any of list/set won't matter , i guess. | |
| May 29, 2012 at 12:53 | comment | added | Marko Topolnik | Collection is not a class, btw. Not even an abstract class. | |
| May 29, 2012 at 12:53 | answer | added | Yuriy Nakonechnyy | timeline score: 0 | |
| May 29, 2012 at 12:52 | comment | added | Marko Topolnik | What you are currently stating is that you need the collection only to add elements. That is nonsense. There must be some kind of read operation that you also need. Specify. | |
| May 29, 2012 at 12:49 | history | edited | Priyank Doshi | CC BY-SA 3.0 |
added 76 characters in body
|
| May 29, 2012 at 12:49 | comment | added | Marko Topolnik | You need to specify exactly what operations you plan to use for it. Every implementation is a tradeoff in favor of some operation at the expense of others. | |
| May 29, 2012 at 12:47 | comment | added | Jon Skeet | What do you need from the collection? | |
| May 29, 2012 at 12:47 | answer | added | NPE | timeline score: 69 | |
| May 29, 2012 at 12:46 | comment | added | Kazekage Gaara | For starters : stackoverflow.com/questions/1035008/… | |
| May 29, 2012 at 12:44 | history | asked | Priyank Doshi | CC BY-SA 3.0 |