trove uses 2 arrays (of float in this case) one holding the keys and
another holding the values, so it probably performs very well

i remember seeing somewhere that scala has a @specialized annotation
that makes type parameters acts as templates. I suppose they box /
unbox primitives in method signatures that uses the type parameters
though

On Mon, Nov 30, 2009 at 8:49 PM, Jon Harrop <[email protected]> wrote:
> On Monday 30 November 2009 19:04:54 Robert Fischer wrote:
>> Charles Oliver Nutter wrote:
>> > This also has nothing to do with thread-local heaps, and is a result
>> > of CLR having fully-reified generics that can support primitive
>> > values. A hand-written float->float map in Java should perform as well
>> > or better than the generic version in CLR.
>> >
>> > Of course not having to write the primitive version by hand would be
>> > nice. I've written several myself over the years.
>>
>> This is what Trove is there for.  It's not an actively maintained
>> project, but that's because it's pretty "done".
>
> I haven't benchmarked a hand-rolled JVM-based float->float hash table
> against .NET's default one but the JVM is incapable of expressing value types
> including entries in a hash table so you're probably still taking an
> unnecessary performance hit.
>
> --
> Dr Jon Harrop, Flying Frog Consultancy Ltd.
> http://www.ffconsultancy.com/?e
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "JVM Languages" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/jvm-languages?hl=en.
>
>
>



-- 
http://mapsdev.blogspot.com/
Marcelo Takeshi Fukushima

--

You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.


Reply via email to