I am calling the Google Protocol Buffers Java API from Matlab. This works very well, but I ran into a big lack of performance. The bulk of the data is returned as objects of the type:
java.util.Collections$UnmodifiableRandomAccessList
In fact, they contain a list of floats. I need to convert this to a Matlab matrix. The best approach I've found so far is to call:
cell2mat(cell(Q.toArray()))
However, this line is a huge bottleneck in the code.
Note. I know FarSounder Matlab parser generators for Google protocol buffers, unfortunately they are very slow. Below are some approximate test speeds for my problem (YMMV). Awesome good.
- Harvard Matlab: 0.03
- Pure Python: 1
- Java API called from Matlab (only for parsing and retrieving metadata): 10
- API Java, Matlab ( , ): 0.25
java.util.Collections$UnmodifiableRandomAccessList
Matlab, Java API Matlab .
Java Matlab?
, , , .