Tag Archives: Java

Tungsten FSM: A lightweight Java finite state machine library

I recently came across Tungsten FSM whilst looking for an off the shelf FSM implementation. Ideally I was looking for something which was a lightweight and no-frills but robust FSM implementation, and Tungsten FSM seemed to exactly fit the bill. All configuration is done in code, so no messing around with XML files, and the […]

Calculating floating point epsilon/precision in Java

Floating point arithmetic/rounding can be somewhat painful, made worse by the fact that the epsilon (error) in the machine representation of floating point varies depending on the exponent (i.e. how large/small the number being represented is): Normalized numbers when Base = 2, Precision = 3, Exponents = -1 to 2 [Goldberg91] A very comprehensive paper […]

JMM Synopsis

Useful synopsis of the Java Memory Model from Doug Lea – in particular the clearest explanation I have found so far of the meaning of “happens-before”, and some useful definitions which helped to get a concrete idea of the semantics around safe-publication of variables through Thread.start()…


Just came across this, looks like it has been around on Sourceforge for a while as part of lib-high-scale. Designed for large numbers of CPUs (e.g. Azul hardware), but microbenchmarks claim a small improvement over ConcurrentHashMap even on 2 CPUs.