Accepted answer

If you are not limited to use only Scala/Java maps than for exceptional performance you can peek 3rd party libraries that have maps specialized for Long/Long key/value pairs.

Here is not so outdated overview of such kind of libraries with benchmark results for Int/Int pairs.

Related Query

More Query from same tag