Writing out in Harwell-Boeing format is another case where you will
want to have it sorted.

-Allen

On Fri, Aug 8, 2008 at 12:11 AM, Shalin Shekhar Mangar
<[EMAIL PROTECTED]> wrote:
> If there is never a need to keep it in order except for the unit test, then
> yes, I agree with you. In that case, instead of using sort in the
> asFormatString, I'd rather have the unit test parse the string and then test
> it.
>
> On Fri, Aug 8, 2008 at 12:28 PM, Ted Dunning <[EMAIL PROTECTED]> wrote:
>
>> Remember, the loop in question is for testing only.
>>
>> On Thu, Aug 7, 2008 at 11:37 PM, Shalin Shekhar Mangar <
>> [EMAIL PROTECTED]> wrote:
>>
>> > It maintains doubly linked list through the Map.Entry objects. Additional
>> > memory will be used to keep two(?) additional references per entry. The
>> > cost
>> > in terms of asymptotic behavior is the same. However, iteration is faster
>> > because it depends on the size whereas with HashMap, iteration is
>> > proportional to it's capacity.
>> >
>> > In practice, it is almost as fast and should not be a problem.
>> >
>> > On Fri, Aug 8, 2008 at 11:56 AM, Ted Dunning <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> > > How much memory overhead does the linked hash map add?  How much speed
>> > > cost?
>> > >
>> > > That would solve the problem by making the order stable, but we
>> shouldn't
>> > > slow down the code just to make the test easier to write, especially
>> when
>> > > the additional code in the test is < 1 line of code.
>> > >
>> > > On Thu, Aug 7, 2008 at 11:12 PM, Shalin Shekhar Mangar <
>> > > [EMAIL PROTECTED]> wrote:
>> > >
>> > > > Or use a LinkedHashMap?
>> > > >
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > Regards,
>> > Shalin Shekhar Mangar.
>> >
>>
>>
>>
>> --
>> ted
>>
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>



-- 
allenday.skype
+1 (415) 335-4654 (office)
+1 (310) 804-5304 (mobile)
+1 (515) 474-9337 (fax)

Reply via email to