I\'m implementing an interface that has functionality similar to a table that can contain an types of objects. The interface specifies the following function:
If you wanted to return a double[], you would need to create a new double[], populate it, and return that.
That may be a good architecture decision. First, it doesn't make a lot of sense to cast an Object[] to a Double[]; it's not really an array of Double because there could be Objects in it too. Second, if you return the array directly, the user code can modify it and alter the internal structure of your object.
The main performance impact would be in returning an array of double[], due to unboxing and the cost of allocation.