commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: I need a map for long and double
Date Wed, 06 Nov 2013 01:47:54 GMT
I don't think anything like that exists. If your # of entries were
reasonable, a theoretical implementation could allocate a big long[] array
and hash into that. However, 150,000 is very large for an array; possible
but I never done it. So I think the only thing you can really rely on is
the standard Map<String, Value>


On Tue, Nov 5, 2013 at 7:39 PM, Gary Gregory <garydgregory@gmail.com> wrote:

> Hi All:
>
> I'm looking for a Map implementation that takes a String as a key and a
> long as the value (and another taking a double as the value). I'd rather
> not take the extra memory of using generic map with a Long object value hit
> since the maps will have up to 150,000 entries. That would save me... a meg
> for each map I am guestimating (on a 64-bit JVM). A meg here, a meg
> there...
>
> I did not see anything in [collections] or Google Guava.
>
> Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<
> http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Cheers,
Paul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message