AirConcurrentMap

AirConcurrentMap is a high-performance, memory efficient enhanced java.util.concurrent.ConcurrentNavigableMap. It is unbeatable for more than 1K entries. Read our comprehensive Performance Testing document to understand our testing and see graphics that show our results. You can also download the Trial Software or try our set of trivial tests.  We provide extensive test code using the standard Java Microbenchmarking Harness. Below we show some of the performance results as well. Here are the features:

  • Iterators and forEach() are several times faster than those in any standard Java Map, increasing with scale
  • Faster streaming than JDK Maps at medium to large scale (version 3.2 and later).
  • Reduces Streaming Server Load in busy cases at medium to large scale (version 3.2 and later)
  • 90% Faster searching than Java ConcurrentSkipListMap (for get/put/remove and higher/lower/floor/ceiling)
  • 30% to 50% More Capacity than any standard Java Map above 1K Entries
  • returns all freed space down to one 5KB block, unlike the HashMaps
  • Minimal garbage generation during updates

Special Extensions for Even More Speed

  • MapVisitors capability an easy-to-use extension almost identical to forEach().
  • ThreadedMapVisitors  parallel scanning extension is much faster than Java 8 serial or parallel streams at all scales.

Background — the Standard Interface Tree

The standard Java Map version 1.6 libraries have this interface structure, with the blue boxes being the standard interfaces of the Java Collections Framework, and the green being the implementations provided in the standard Java Map library. The most basic interface is Map, at the top. but the most complete functionality is at the bottom, in Java ConcurrentNavigableMap. On the left side going down, the Java Map subinterfaces add ordering, which is slower but far more capable and flexible. On the right going down, concurrency is added, which allows for thread safety and multi-core concurrency for overlapped execution. AirConcurrentMap, being a ConcurrentNavigableMap, is both ordered and multi-core.

MapDiagram(2)

The capabilities of the various Java Maps can be seen in this bullet chart. AirConcurrentMap is ordered and concurrent, hence is a universal drop-in replacement for any other Java Map. This means the capacity increase above 1K Entries, iteration speedup and multi-core concurrency is always available simply by replacing the constructors in the code.

diagram2

The graphs below show how easily AirConcurrentMap beats ConcurrentSkipListMap. The curves show not only higher speed, but also end with more entries, showing AirConcurrentMap time and space advantages. The curves end where the JVM slows down and runs out of space at 2GB with 64-bit Java 1.8 client in a quad-core 2.3GHz Intel i7 with 8GBRAM on Windows 7. These and many other detailed graphs are provided in AirConcurrentMap Performance Testing.

Get Tests

graph0
graph2

Put Tests

graph3
graph4
graph5

Iteration Speed

Note the scan speed of the AirConcurrentMap can be further much improved  by using the special  MapVisitors and ThreadedMapVisitors techniques. This is with 32-bit Java 7 on a 2.4 Ghz X86-64.

graph7
graph6

Iterator Speed Logarithmic Size

Here the X-axis is the logarithm of the Map size. The advantage grows very large starting at about 50K Entries. This is with 64-bit Java 8 on a 2.4 Ghz X86-64 quad core, single-threaded. Note that the advantage rapidly reaches about two times as size increases.

ForEach() Logarithmic Size

Beyond about 100 Entries, AirConcurrentMap is faster, reaching about twice the speed of any other JDK Map. The special AirConcurrentMap MapVisitor technique is almost identical in usage to forEach(). Use the ThreadedMapVisitor parallel scan for much more performance.

Faster than Parallel Streams

The ThreadedMapVisitor extension is much faster than parallel streams with  ConcurrentHashMap or ConcurrentSkipListMap:
For a Free Trial Download see the shop. For a development and deployment version, please email support@boilerbay.com