Fastutil seems to be the fastest option for collections in Java.
There are these javadocs: http://fastutil.di.unimi.it/docs/it/unimi/dsi/fastutil/longs/Long2ObjectMaps.SynchronizedMap.html
but I have difficulty to find the usage example.
How can I have a synchronized (thread-safe?) map? An immutable map?
Each map type has its own synchronized wrapper class (e.g.
Long2ObjectMaps.SynchronizedMapas you linked above). To use it, instantiate a concrete map implementation, then use the corresponding…Maps.synchronize()method to get the synchronized version: