« first day (67 days earlier)      last day (3168 days later) » 

1:11 PM
hi all
 
 
2 hours later…
3:16 PM
hello
 
morning all
still waiting for the coffee to kick in
 
hey. anybody upgraded to the new R2015b?
first thing it says: "New execution engine that runs MATLAB code faster"
this is big news!
 
sorry, haven't upgraded... I'm still trying to upgrade to Octave 4.0 ;)
 
> The new MATLAB execution engine includes performance improvements to function calls, object-oriented operations, and many other MATLAB operations.
>
> These performance improvements result in significantly faster execution of many MATLAB programs with an average speed-up of 40% among 76 performance-sensitive applications from users. Of these tested applications, 13 ran at least twice as fast and only 1 slowed down by more than 10%.
>
> The new execution engine uses just-in-time compilation of all MATLAB code which makes performance more uniform and predictable. The new engine offers impro
@beaker: me neither, I just think this is awesome :)
 
wow, that sounds major
 
3:32 PM
browsing the release notes, I see a couple of new things I like
MinGW-w64 as a supported C++ compiler (for MEX things)
fix the way we overload subsref and subasgn
graph functions
2d histograms
ImageDatastore
high-DPI support
 
3:47 PM
I haven't tried it. Have you, @Amro?
histogram2 sounds good. It was about time!
 
no not yet
apparently the overhead of calling functions is much lower now
 
I'll install it when I have some time (not sure when). Downloading it from Mathworks (as per my university's account) is sloooow
The most important thing: for loops should continue to be slower than vectorized operations. Or else Matlab programming will lose most of its appeal :-D
 
haha
I guess this needs to be revisited now
81
Q: Is MATLAB OOP slow or am I doing something wrong?

stijnI'm experimenting with MATLAB OOP, as a start I mimicked my C++'s Logger classes and I'm putting all my string helper functions in a String class, thinking it would be great to be able to do things like a + b, a == b, a.find( b ) instead of strcat( a b ), strcmp( a, b ), retrieve first element o...

@LuisMendo then again the release notes say that the new engine uses JIT on all MATLAB code (whatever that means!), so maybe loops vs. vectorized code performance is also affected...
 
 
2 hours later…
6:18 PM
hi! Let me catch up.
wow... if R2015b is faster, this will convince me to upgrade. I haven't due to sheer laziness.
 
6:45 PM
@LuisMendo If you get a chance to do timings on the dec2bin problem, I'd be very interested in the results.
I'm not seeing anything even remotely similar to Matt's results on Octave
0
Q: Generate truth table in MatLab

Matt TI want to create a truth table in MatLab with i columns and i2 rows. For example, if i=2, then T = \begin{bmatrix} 0 & 0 \\ 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{bmatrix}. Code to do this has already been created here This is part of a larger project, which requires i large. Efficiency is a concern...

I get about 170s for the loop-based solution versus 0.7s for yours.
 
 
2 hours later…
8:36 PM
The loop approach (getcondvects) is the fastest indeed on my machine
I also compared with an adapted version of
28
Q: Generate a matrix containing all combinations of elements taken from n vectors

Luis MendoThis question pops up quite often in one form or another (see for example here or here). So I thought I'd present it in a general form, and provide an answer which might serve for future reference. Given an arbitrary number n of vectors of possibly different sizes, generate an n-column matrix...

These are the results (R2014b) @beaker
function y = f(n)
y = rem(floor((0:2^n-1).'*pow2(1-n:0)),2);

function combs = g(n)
combs = cell(1,n);
[combs{end:-1:1}] = ndgrid([0 1]);
combs = cat(n+1, combs{:});
combs = reshape(combs,[],n);

n = 20;
timeit(@()f(n))
timeit(@()getcondvects(n))
timeit(@()g(n))

ans =
    1.5083
ans =
    0.2946
ans =
    0.3327
 
 
1 hour later…
9:51 PM
@LuisMendo This means that the loop in Octave is 100x slower than it should be. Or maybe bin2dec is 100 faster... hahaha... I think I'll have a look at Julia. :)
 

« first day (67 days earlier)      last day (3168 days later) »