I have a bit of code which runs in 10.919 s. Profiling it shows that 10.182 s are wasted in
opaque.double
Which is called when I use
jClass.GetArrays(jArray1,jArray2);
struct.prop1 = double(jArray1);
struct.prop2 = double(jArray1);
What can be done? I have to use Java to interact with external API.
EDIT: I used the following hack:
struct.prop1 = cell2mat( cell( jArray1) );
And got down to 1.5s / 2.2s
EDIT:
Making the java return long comma delimited string representation of the arrays and then using
data = strread(char(jString),'%f','delimiter',',' );
Produced almost bearable performance