Tuesday, May 5, 2009

Java floats and doubles

I'm attempting to write some high performance Java. There is some limited evidence that you might expect a small performance improvement using floats over doubles.

There is a good case why memory usage will be reduced.

However, why is it such a pain to use floats? I am constantly finding methods, in the Graphics2D classes, which only support one or the other (generally better support for Doubles).

I think this post sums up reasons not to use floats, and makes a good point: why have floats at all?

No comments: