5.1.0 (June 2014)
Binaries
Javadoc
JDiff
Differences between 5.0.0 and 5.1.0
Acquiring GS Collections
Maven
<dependency>
<groupId>com.goldmansachs</groupId>
<artifactId>gs-collections-api</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>com.goldmansachs</groupId>
<artifactId>gs-collections</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>com.goldmansachs</groupId>
<artifactId>gs-collections-testutils</artifactId>
<version>5.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.goldmansachs</groupId>
<artifactId>gs-collections-forkjoin</artifactId>
<version>5.1.0</version>
</dependency>
Ivy
<dependency org="com.goldmansachs" name="gs-collections-api" rev="5.1.0" />
<dependency org="com.goldmansachs" name="gs-collections" rev="5.1.0" />
<dependency org="com.goldmansachs" name="gs-collections-testutils" rev="5.1.0" />
<dependency org="com.goldmansachs" name="gs-collections-forkjoin" rev="5.1.0"/>
Improvements
Java Microbenchmark Harness performance test suite
There are two new modules named jmh-scala-tests
and jmh-tests
which include new performance tests leveraging Java Microbenchmark Harness. They supplement the existing performance-tests
module. The focus of these tests is to compare the performance of various iteration patterns across several libraries, including GS Collections, Java 8 Streams, Scala collections, and Guava. Each iteration pattern is tested in serial and in parallel. Where the API is available, they are also tested eagerly and lazily.
As an example, here is the test of the GS Collections implementation of count()
, using serial eager evaluation.
@GenerateMicroBenchmark
public void serial_eager_gsc()
{
int evens = this.integersGSC.count(each -> each % 2 == 0);
Assert.assertEquals(SIZE / 2, evens);
}
Use of lambdas in the test suites
The GS Collections library is compiled with Java 5 to ensure its backwards compatibility. However, the test modules are free to use any version of Java. Most of the test modules now use Java 8. We've replaced all of the anonymous inner classes with lambdas or method references. We've also replaced many usages of code block factories with the equivalent lambda or method reference. For example, instead of using Functions.getToString()
, we use String::valueOf
in most tests.