Choose the Collection which meets your requirements -- if you don't want to
inadvertently add two or more objects representing the same Key, then use a
Set, and if you need this set of Keys to be sorted, then use a SortedSet. If
this isn't a requirement, go ahead and use a List or Collection, as these
are likely to be negligibly faster. But, I doubt that you'll see a huge
performance difference using a Set versus a List, for example, especially if
you're lists are small.

- Jason

On Thu, Oct 15, 2009 at 7:10 AM, Nacho Coloma <icol...@gmail.com> wrote:

>
> Hi,
>
> If I plan to use a property to store a Relation Index such as a
> List<Key>, Set<Key> or SortedSet<Key>, which one should give best
> performance supposing order is not relevant? My intuition says to go
> with Set or SortedSet, but I wanted to ask first.
>
> Best regards,
>
> Nacho.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to