Re: SortedList: best practices with java 1.5
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Sat, 05 Nov 2005 08:50:51 GMT
On Fri, 4 Nov 2005 10:20:25 -0600, "Joan" <Joan@xxxxxxxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :
>> I saw the technique using Collections.binarySearch() method to
>> identify
>> the insertion point. In terms of speed, is that faster than
>> simply
>> calling Collections.sort() on every add()? I did a fair amount
>> of
>> googling and searching of this group without finding any RECENT
>> discussions (since 1.5) regarding this subject.
You can be lazy and just tack them on the end, and only sort when you
need the sorted order.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.
- References:
- Re: SortedList: best practices with java 1.5
- From: Joan
- Re: SortedList: best practices with java 1.5
- Prev by Date: Re: SocketException: Connection reset
- Next by Date: Re: why isn't FileChannel selectable?
- Previous by thread: Re: SortedList: best practices with java 1.5
- Next by thread: EJB Stateful Session Beans
- Index(es):
Relevant Pages
|