Home and tutorial index  Synchronization and concurrency  Regular expressions

A graph tells a thousand words...

A key element of the tutorials and discussions on this site is a focus on performance. Below is an "index by graph" of some of the Java performance information on this site. Please note that to interpret the graphs correctly, it is worth reading the corresponding article in full (see the links below).

comments powered by Disqus

Relative speed of various secure hash functions; see the section on secure hash functions in Java (part of the cryptography tutorial) for more details.

RSA Decryption time by key length; see Java cryptography section for more details.

What is thread priority?:
a look at how setting different thread priorities in Java actually behaves on different platforms.

Timing of the Math.exp() function, looking at how it varies depending on input value, and possible alternatives.

Throughput of a moderately-contended ConcurrentHashMap vs a synchronized HashMap

The ConcurrentHashMap is a significant weapon in the concurrency armoury of Java 5, made possible underlyingly by the exposure of atomic instructions at the Java level. This article discusses the performance and features of ConcurrentHashMap, and in particular compares it to a regular synchronized HashMap.

Methods of concurrency array access compared, including the AtomicIntegerArray and CopyOnWriteArrayList.

In this and related articles, we look at the performance of Java 5 atomic variables and locks. The graph pictured compares various methods for concurrently accessing an array of integers.

Relationship between buffer size and CPU usage with a BufferedInputStream.

As part of our Java I/O tutorial, we look at buffer sizes with the Java BufferedInputStream class. We see that, even when a larger buffer does not affect elapsed time to read data, it can still affect CPU time.

Bit probability distribution in String hash codes

This is a key section if you want to understand hash functions. We look in particular at properties of the Java String.hashCode() function, and give some guidance on how to write a hash function if you need to roll your own for a particular class.

String tokenisation performance: comparing a StringTokenizer with regular expressions.

As part of our section on the Java regular expression library (available as of Java 1.4), we look at the relative performance of the regex-based split() methods over the "hand-cranked" StringTokenizer.


 Javamex home: tutorial index

Written by Neil Coffey. Copyright © Javamex UK 2011. All rights reserved.