Java Collections till the last breadcrumb of memory and performance
See the codeA family of projects around collections in Java (so far).
A carefully designed extension of the Java Collections Framework with primitive specializations and more. Java 6+. Apache 2.0 license.
Compatibility with the Java Collections Framework
Collection, Set, Map),
hence could be used as drop-in replacements of slow collections of boxed valuesJavaDoc: Java 6 | Java 7 | Java 8
An annotation processor, generates implementations for collection-like abstract classes or interfaces. API agnostic, may be used to generate implementation for classes or interfaces, extending interfaces from the Koloboke Collections API, or, for example, interfaces from the Trove collections library. "Embeddable version" of the Koloboke implementation library.
Add the following dependencies in your Maven pom.xml:
<dependency>
<groupId>com.koloboke</groupId>
<artifactId>koloboke-compile</artifactId>
<version>0.5.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.koloboke</groupId>
<!-- `jdk6-7` instead of `jdk8` if you use Java 6 or 7 -->
<artifactId>koloboke-impl-common-jdk8</artifactId>
<version>1.0.0</version>
</dependency>
Or in your Gradle build script, you should first apply the propdeps Gradle plugin to enable
provided dependencies, and then configure the dependencies block:
dependencies {
provided 'com.koloboke:koloboke-compile:0.5.1'
// `jdk6-7` instead of `jdk8` if you use Java 6 or 7
compile 'com.koloboke:koloboke-impl-common-jdk8:1.0.0'
}
Next step: read the Koloboke Compile tutorial.
An efficient implementation of the Koloboke Collections API.
Compatibility with the Java Collections Framework
null keys are (optionally) supported, just like in java.util.HashMapFloat.NaN and Double.NaN keys are treated consistently with boxed version
(all NaNs are considered equal)Add the following dependencies in your Maven pom.xml:
<dependencies>
<dependency>
<groupId>com.koloboke</groupId>
<artifactId>koloboke-api-jdk8</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.koloboke</groupId>
<artifactId>koloboke-impl-jdk8</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
</dependency>
<dependencies>
Or to your Gradle build script:
dependencies {
// `jdk6-7` instead of `jdk8` if you use Java 7 or older
compile 'com.koloboke:koloboke-api-jdk8:1.0.0'
runtime 'com.koloboke:koloboke-impl-jdk8:1.0.0'
}
Or similarly for your favourite build system.
Then you can start using collections. Replace all lines like
Map<Integer, Integer> map = new HashMap<>();
with
Map<Integer, Integer> map = HashIntIntMaps.newMutableMap();
Next step: see [the table of equivalents of JDK collection patterns] (http://leventov.github.io/Koloboke/api/1.0/java8/index.html#jdk-equivalents).
Use issues or ask a question on StackOverflow.
Gradle build requires Java 8 compiler, set JAVA_HOME environment variable to the JDK 8 location.
Next to your JDK 8 location (i. e. a jdk1.8 directory), JDK 9 installation has to be present in
a jdk-9 directory. For meta projects development, JDK 6 and JDK 7 also have to be present in
jdk1.6 and jdk1.7 directories sibling to the jdk1.8 directory.
Then
$ git clone git@github.com:leventov/Koloboke.git
$ cd Koloboke
$ ./gradlew :buildMeta
$ ./gradlew buildMain -x test -x findbugsMain -x findbugsTest
$ ./gradlew idea
Then you can open the project in IntelliJ IDEA.
To rebuild meta projects (code generators), run from the project root dir:
$ ./gradlew :cleanMeta :buildMeta
To rebuild either the lib, benchmarks or both, run
$ ./gradlew cleanMain buildMain
from the lib, benchmarks subdir or the root project dir respectively.
To build the lib for Java 8, run
$ ../gradlew cleanMain buildMain -PlibTargetJava=8
from the lib subdir.
If you want to generate proper Javadocs, especially for Java 6 or 7, you should specify
javadocExecutable and jdkSrc build properties (see
Gradle docs
for how to do that). Typical javadocExecutable value is JAVA_HOME/bin/javadoc[.exe], jdkSrc
should point to a directory which contain uncompressed JDK sources, i. e. package structure starting
from java, javax, sun, etc. subdirs.
756 followers · starred Jul 2014
321 followers · starred Oct 2014
99 followers · starred Sep 2016
128 followers · starred Mar 2016
Java Collections till the last breadcrumb of memory and performance
See the codeA family of projects around collections in Java (so far).
A carefully designed extension of the Java Collections Framework with primitive specializations and more. Java 6+. Apache 2.0 license.
Compatibility with the Java Collections Framework
Collection, Set, Map),
hence could be used as drop-in replacements of slow collections of boxed valuesJavaDoc: Java 6 | Java 7 | Java 8
An annotation processor, generates implementations for collection-like abstract classes or interfaces. API agnostic, may be used to generate implementation for classes or interfaces, extending interfaces from the Koloboke Collections API, or, for example, interfaces from the Trove collections library. "Embeddable version" of the Koloboke implementation library.
Add the following dependencies in your Maven pom.xml:
<dependency>
<groupId>com.koloboke</groupId>
<artifactId>koloboke-compile</artifactId>
<version>0.5.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.koloboke</groupId>
<!-- `jdk6-7` instead of `jdk8` if you use Java 6 or 7 -->
<artifactId>koloboke-impl-common-jdk8</artifactId>
<version>1.0.0</version>
</dependency>
Or in your Gradle build script, you should first apply the propdeps Gradle plugin to enable
provided dependencies, and then configure the dependencies block:
dependencies {
provided 'com.koloboke:koloboke-compile:0.5.1'
// `jdk6-7` instead of `jdk8` if you use Java 6 or 7
compile 'com.koloboke:koloboke-impl-common-jdk8:1.0.0'
}
Next step: read the Koloboke Compile tutorial.
An efficient implementation of the Koloboke Collections API.
Compatibility with the Java Collections Framework
null keys are (optionally) supported, just like in java.util.HashMapFloat.NaN and Double.NaN keys are treated consistently with boxed version
(all NaNs are considered equal)Add the following dependencies in your Maven pom.xml:
<dependencies>
<dependency>
<groupId>com.koloboke</groupId>
<artifactId>koloboke-api-jdk8</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.koloboke</groupId>
<artifactId>koloboke-impl-jdk8</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
</dependency>
<dependencies>
Or to your Gradle build script:
dependencies {
// `jdk6-7` instead of `jdk8` if you use Java 7 or older
compile 'com.koloboke:koloboke-api-jdk8:1.0.0'
runtime 'com.koloboke:koloboke-impl-jdk8:1.0.0'
}
Or similarly for your favourite build system.
Then you can start using collections. Replace all lines like
Map<Integer, Integer> map = new HashMap<>();
with
Map<Integer, Integer> map = HashIntIntMaps.newMutableMap();
Next step: see [the table of equivalents of JDK collection patterns] (http://leventov.github.io/Koloboke/api/1.0/java8/index.html#jdk-equivalents).
Use issues or ask a question on StackOverflow.
Gradle build requires Java 8 compiler, set JAVA_HOME environment variable to the JDK 8 location.
Next to your JDK 8 location (i. e. a jdk1.8 directory), JDK 9 installation has to be present in
a jdk-9 directory. For meta projects development, JDK 6 and JDK 7 also have to be present in
jdk1.6 and jdk1.7 directories sibling to the jdk1.8 directory.
Then
$ git clone git@github.com:leventov/Koloboke.git
$ cd Koloboke
$ ./gradlew :buildMeta
$ ./gradlew buildMain -x test -x findbugsMain -x findbugsTest
$ ./gradlew idea
Then you can open the project in IntelliJ IDEA.
To rebuild meta projects (code generators), run from the project root dir:
$ ./gradlew :cleanMeta :buildMeta
To rebuild either the lib, benchmarks or both, run
$ ./gradlew cleanMain buildMain
from the lib, benchmarks subdir or the root project dir respectively.
To build the lib for Java 8, run
$ ../gradlew cleanMain buildMain -PlibTargetJava=8
from the lib subdir.
If you want to generate proper Javadocs, especially for Java 6 or 7, you should specify
javadocExecutable and jdkSrc build properties (see
Gradle docs
for how to do that). Typical javadocExecutable value is JAVA_HOME/bin/javadoc[.exe], jdkSrc
should point to a directory which contain uncompressed JDK sources, i. e. package structure starting
from java, javax, sun, etc. subdirs.
756 followers · starred Jul 2014
321 followers · starred Oct 2014
99 followers · starred Sep 2016
128 followers · starred Mar 2016