Project is intended to provide comparison of selected libraries with persistent collections.
Project contains benchmarks for following collections libraries (and data structures):
- Java Built-In Collections
- Paguro 3.1.2
- Vavr 0.10.2
- PCollections 3.1.2
- Bifurcan 0.1.0
- Cyclops 10.4.0
Three test scenarios are implemented for each of the basic type of data structure (List, Map and Set):
- Insert N integers into data structure.
- Iterate over data structure containing N elements.
- Read N random elements from data structure containing N elements. Following values are being used for N: 100, 1000, 10000. You could easily configure tests by modifying BaseExecutionPlan class.
Below, you can find references to the data structure specific tests.
- Build project with maven
mvn clean install - Run specific benchmark using following command:
java -jar ./target/persistent-collections-benchmark.jar <BenchmarkClassName> -rf jsonIf noBenchmarkClassNameparameter is passed then all benchmarks will be executed. Results in JSON format will be saved injmh-result.jsonfile.
You may also override default configuration by passing command line arguments. Please check JHM documentation for details.
You can use following site to easily visualize the results. Just upload jhm-result.json file.