Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

readme.md

Sync Collections


Build Status MIT License Discord Maven Central Maven Snapshot Version

Provides concurrent thread-safe collections for highly concurrent scenarios in Java 17+.

  • BucketSyncMap: A high-performance implementation of ConcurrentMap.

    • Fully compatible with the Java Collections Framework (ConcurrentMap).
    • Delivers up to 2× higher update throughput than ConcurrentHashMap under heavy contention, while matching its performance for reads and other operations.
  • ForwardedSyncMap: A performant implementation of ConcurrentMap.

    • Fully compatible with the Java Collections Framework (ConcurrentMap).
    • Delivers up to 2× higher update throughput than ConcurrentHashMap under heavy contention, while being a bit slower in reads and other operations.

Dependency

Sync is available at the Maven Central Repository.

Gradle

dependencies {
  implementation("space.vectrix:sync-collections:1.0.0")
}

Maven

<dependency>
  <groupId>space.vectrix</groupId>
  <artifactId>sync-collections</artifactId>
  <version>1.0.0</version>
</dependency>

Performance

The benchmarks below were recorded on a M4 Macbook Pro.

Inspiration & Credits

SyncMap draws inspiration from Go’s sync package — particularly its sync.Map and synchronization primitives — to deliver efficient, lock-free behavior in Java.