Re: Set / List
From: Robert Olofsson (d94-rol_at_tjatte.nada.kth.se)
Date: 10/18/03
- Next message: Shaun: "Re: Inheritance and no-argument constructors"
- Previous message: Robert Olofsson: "Re: Monitoring thread stalls"
- In reply to: Chris Smith: "Re: Set / List"
- Next in thread: Chris Smith: "Re: Set / List"
- Reply: Chris Smith: "Re: Set / List"
- Reply: Randall R Schulz: "Re: Set / List"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Oct 2003 09:08:53 GMT
Chris Smith (cdsmith@twu.net) wrote:
: That's exactly it. The Collections API is very concerned with the order
: of complexity assigned to various operations. Using hashing as the
: store for a Set makes it much faster to check...
: What advantage do you see for using a List?
Less memory use. A hash has an array where it stores Entries,
Each entry has at least two references. A list only has the array
with references to the values.
If memory is the problem it is easy to write a ListSet that uses a
list as a backend. I would think that speed is preferd for nearly all
applications though.
/robo
- Next message: Shaun: "Re: Inheritance and no-argument constructors"
- Previous message: Robert Olofsson: "Re: Monitoring thread stalls"
- In reply to: Chris Smith: "Re: Set / List"
- Next in thread: Chris Smith: "Re: Set / List"
- Reply: Chris Smith: "Re: Set / List"
- Reply: Randall R Schulz: "Re: Set / List"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|