When passing values to and from Java types, we automatically coerce numbers and strings. That means numbers coming out of a ConcurrentHashMap will always get turned into Fixnum on the way out. This may not be desirable but it is somewhat "legacy" behavior now. Does this cause a problem for you?
We used ruby native map with Fixnum to java Integer mapping for speeding up our jruby - java interop via avoiding conversions. And we did have speed up.
But then we switched to ConcurrentHashMap. And I have no idea how speed it up back.
We switched because native jruby maps hangs when used concurrently from different threads. I think I posted an issue about this, but cannot find this post now.
Problem only in that this speed up does not work anymore. Maybe we'll workaround somehow.