I want to use floating-point numbers in my J2ME (MIDP 2.0) program.
I don’t need high precision, so I’m considering choosing float type.
However, it seems to me that I read a Java article which says that double is better supported by processors, so it is faster.
I’m doing many operations with such numbers, so performance is important to me.
The question is, which one of these data types works faster in J2ME?
The performance difference between float and double is not that significant.
If you are doing those operation very frequently than float is better also it consume less space.
Update:
Try executing these methods in your real device to measure the performance difference Its not much significant.