Fast Java Libraries

Because Java is my favorite Programming Language, I spend allot of time with it.
One thing I’m always interested in is Performance. So I want to share with you my favorite libraries I use to make my creations a little faster.

Trove

Trove is a Java library for collections using primitive types (not the wrapper classes the JDK uses). It is faster and uses allot less memory, than the JDK Collections.
You can find Trove at: trove.starlight-systems.com

JafamaJavaFastMath

Jafama is a library, that contains Math functions, that are a little (10^-13) less accurate, but are allot faster. In many you don’t need numbers that are more precise, than 5-6 digests past the comma. You can find it here: sourceforge.net/projects/jafama/

Xorshift

Xorshift is an awesome Pseudo-Random-Generation-Algorithm. It creates better random numbers (in sense of distribution) than the standard JDK-Random. It is also 30% faster!
You can read a little about the history of random number generating here. You can find an implementation here.

Caliper

Caliper is a Framework to make accurate Java Micro-benchmarks. It is not a library, that will make your application faster by itself, but it enables you to make better decisions on what code snippet is really faster. believe me, in Java it is really hard to measure a small peace of code accurately, but caliper does a really good job with that. The Caliper-Examples are already very helpful in choosing the faster variant of some very day to day things. Who would think, that most of the time "Arrays.sort" is faster than "System.arraycopy"!

No comments:

Post a Comment