Is indexing vectors in MATLAB inefficient?
I can, of course, only speculate. However when I run your test with the JIT compiler enabled vs disabled, I get the following results: % with JIT no JIT 0.1677 0.0011 %# init 0.0974 0.0936 %# #1 I added an assigment before this line to avoid issues with deferring 0.4005 0.4028 %# #2 0.4047 0.4005 … Read more