Performance: float vs float?

I need to store a lot floatin an array. There must be spaces in the array in which the values ​​are not stored (at least temporary).

My solution is to create an array of the wrapper class floatand set the spaces to null. Clearly, this is slower than dealing with float-array, but there is no way to set it null.

Now my question is: how big is the performance (time and memory) when taken floatinstead float?

SOLUTION: Use floatand set spaces in NaNwithFloat.NaN

Thank you for your responses!

+4
source share

All Articles